tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Placing lwp in uarea [was: Re: uarea swap-out]
On Jan 23, 2010, at 1:21 AM, David Laight wrote:
> On Sat, Jan 23, 2010 at 05:42:44PM +1100, matthew green wrote:
>>
>> what is the purpose of this change?
To coalesce the number of allocations needed for lwp creation.
>> 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.
I've been thinking about separating stacks from lwp's for a long time. It does
require not putting the pcb into the uarea. If we go that route, do we me need
still l_md? It's nice not having to do an extra deference but having it does
make a DDI/DDK interface a bit since md_lwp could change in size.
> 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 could allocate more than one page to reduce the overhead. But that's a
problem for systems using PMAP_MAP_POOLPAGE since they would want contiguous
physical pages.
Home |
Main Index |
Thread Index |
Old Index