On Thu, Aug 11, 2005 at 03:44:08PM -0400, Peter Memishian wrote:
| 
|  > | even though they're allocated KPD_LOCKED?
|  > 
|  > Pageable as in, when the stack ain't in use, it can be freed.
| 
| when isn't a stack in use?

KPD_LOCKED allocates the pages and implicitly does the same thing
segkp_fault(F_SOFTLOCK) would do to them -- it allocates the pages and
leaves them locked SE_SHARED -- i.e. they are not pageable.

swapout() unlocks the seg_kp stack pages (segkp_fault(F_SOFTUNLOCK)), so that
they become pageable, which is OK since a swapped out process isn't runnable
and therefore can't use its kernel stack.

swapin() does the reverse, and calls segkp_fault(F_SOFTLOCK)... if the pages
were paged out by segkp, this will cause segkp to go bring them back in, and
lock them so they are again non-pageable.

So the summary is, if a process gets swapped out, its stack can be swapped out.
In normal paging, kernel stacks are not swapped out, since the process could
still become runnable.

These days, machines have lots of memory, so segkp is mostly kernel bloat and
it will probably go away soon.

-- 
Eric Lowe       Solaris Kernel Development              Austin, Texas
Sun Microsystems.  We make the net work.                x64155/+1(512)401-1155
_______________________________________________
opensolaris-code mailing list
[email protected]
https://opensolaris.org:444/mailman/listinfo/opensolaris-code

Reply via email to