Subject: Re: Speeding up fork/wait path
To: Jason Thorpe <thorpej@wasabisystems.com>
From: Charles M. Hannum <abuse@spamalicious.com>
List: tech-kern
Date: 11/02/2003 20:37:57
On Sunday 02 November 2003 08:26 pm, Jason Thorpe wrote:
> On Sunday, November 2, 2003, at 12:19 PM, Charles M. Hannum wrote:
> > That's totally the wrong direction. What we should be doing is
> > mapping stack
> > pages in the target process and just doing copyin()s. We can use
> > copyinstr()
> > with a bound to detect when we hit the end of a page.
>
> I like this approach a lot better; avoid the temporary buffer
> altogether.
>
> The only trick would be to ensure that the KVA has a compatible cache
> alias on virtually indexed cache systems, unless we can somehow ensure
> that the stack pages aren't mapped at all in the target process at the
> time the args are copied.
That's easy enough to guarantee, depending on how we allocate the pages. We
may need to allocate them manually here anyway, because otherwise we could
get a fault on the wrong side of copyinstr() and the kernel would be...
upset.