Oliver Yang wrote:
I have several questions about swapped out  kernel memory:

1. What kind of kernel memory can be swapped out?

seg_kp is the only kernel pageable segment. It is used primarily for lwp thread stacks.

Does it means the all memory managed by segkp can be swaped out?

Only when it is not actively in use. Unless a thread is blocked and swappable (e.g. blocked in cv_wait_sig_swap()) its stack is not pageable.

Beside this, any other portions of kernel memory can be swaped out?

No.

2. How kthread's stack swaped out can impact the findleaks results?
..
When lots of kthread's stack swaped out was found, it indicates mdb couldn't verify the all of memory reference in kthread's stack, maybe leaked memory's reference exists in those swaped out stacks.

If it's true, we couldn't trust the kmem leaks reported by ::findleaks in this case, right?

That's correct. If the only references to these objects are in thread stacks which reside on disk they will be incorrectly tagged as leaked.

These days thread stacks are such a small percentage of kernel usage, it almost seems silly to even bother swapping thread stacks. seg_kp is on the list of things to bulldoze in Nevada, it creates more maintenance headaches than its functionality justifies.

- Eric
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to