Subject: fork1(), uvm_fork() and cpu_fork()
To: None <email@example.com>
From: David Laight <firstname.lastname@example.org>
Date: 11/29/2002 15:55:38
At the momemt fork1() calls uvm_form() which then calls cpu_fork().
ISTM that it would be better for fork1() to call cpu_fork() after
This would enable process setup that required access to the user
area to be put into (the more logical) fork1() routine, instead
of having to hide it in uvm_fork().
At the moment the only such code is that which sets up the p->p_stats
area. However I have just made a kernel which puts p->p_sigacts
into the user area . This requires sigactsinit() to be called
after the child's user area has been locked down.
I've also noticed the PHOLD(p1) and PRELE(p1) in fork1().
Surely p1 is the active process so cannot be swapped?
What must be necessary is to stop p2 (the child) being swapped?
 unless it is shared, when it is allocated from the pool.
David Laight: email@example.com