Subject: Re: scheduler_wait_hook
To: None <david@l8s.co.uk>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-kern
Date: 10/07/2005 09:51:37
> > currently, scheduler_fork_hook copies parent's p_estcpu to child.
> > and scheduler_wait_hook adds it back to the parent.
> > it effectively doubles parent's p_estcpu and make some applications
> > (eg. my login script ;-) unreasonablly slow on cpu-loaded machines.
>
> I can't remember whether NetBSD fork() returns in the child of parent first.
>
> Often the child runs first because it is expected to do an exec() next,
> and that (hopefully) reduces the number of 'copy-on-write' faults.
> However this leaves the parent process sleeping as an active process so
> that its priority get killed.
>
> If that is happening, then adding a short delay in the child (eg poll(0,0,1))
> when it returns from fork() can let the parent run and get back to its
> main blocking point. Then the parents priority stays sane.
so? i guess you are talking about unrelated thing.
YAMAMOTO Takashi