Subject: Re: GCC3.3.1 switch coming soon.
To: Nathan J. Williams <nathanw@wasabisystems.com>
From: Chuck Silvers <chuq@chuq.com>
List: tech-kern
Date: 09/24/2003 08:44:15
On Wed, Sep 24, 2003 at 10:36:55AM -0400, Nathan J. Williams wrote:
> Chuck Silvers <chuq@chuq.com> writes:
> 
> > from UVM's standpoint, there's no real difference between the initial stack
> > for a process and any other amap-backed mapping.  other pthreads will have
> > their own stacks, and we don't want to treat all of those specially,
> > so we shouldn't treat the initial stack specially either.
> 
> There is one difference that would be useful. Currently, since the
> kernel tracks the lowest used address of the initial stack, the
> core-dumping routine only dumps the used portion, not the entire
> mapped range. It would be nice (and save a lot of space in the cores
> of most threaded programs) if we could also only dump the used portion
> of other stacks. This probably calls for cleverness on the part of the
> core-dumping code, though, rather than in the VM layer.

yea, that sounds reasonable.

more generally, it would be good to skip any zero-fill region that hasn't
yet been instantiated.  stacks are not different than malloc'd space in
this respect.


> (There are also yellow-zone stack tricks that could be useful, but I
> think those could be managed in userlevel with existing mprotect() and
> faulting-address information).

doing it from userspace would be preferable, yea.

-Chuck