On Sat, Jan 23, 2010 at 05:42:44PM +1100, matthew green wrote:
> 
> what is the purpose of this change?
> 
> struct lwp is approx 700-1000 bytes on our platforms.
> that's a significant chunk to remove from kernel stacks isn't it?

My thoughts exactly ....

There are also lurking ideas to avoid needing a kernel stack for every LWP.
Many of the 'normal' sleep points for lwp can handled by restarting the
system call when the wakeup event happens.

So, if it makes any sense, moving the uarea fields into struct lwp
makes slightly more sense.

The next problem is that, as structures get larger, the memeory
allocater gets less efficient (there is more waste at the end of the page
relative to the number of items in the page). So allocating one big
area will use more memory that two (or more) small ones.

We also have the lurking kernel DDI/DKI issue - where you want to expose
pointers to small structures which can grow extra members (at the end)
so maintaining binary compatibility, rather than a large structure that
ought to be immutable.

        David

-- 
David Laight: da...@l8s.co.uk

Reply via email to