svn commit: r187607 - head/usr.bin/truss

Kostik Belousov kostikbel at gmail.com
Mon Jan 26 12:11:54 PST 2009


On Mon, Jan 26, 2009 at 02:03:10PM -0500, David Schultz wrote:
> On Mon, Jan 26, 2009, Bruce Evans wrote:
> > - P_SYSTEM has something to do with swapping, and I also removed the
> >   PS_INMEM setting for init.  I have always used NO_SWAPPING and haven't
> >   used a swap partition since memory sizes reached 64MB, so I wouldn't
> >   have noticed problems with this.  init doesn't run often so it is
> >   quite likely to be swapped (if allowed to) if real memory runs out.
> 
> Process kstack swapping was removed several years ago, so
> "swapping out" a process just deactivates all of its pages.
> In principle this could be safe to do with init, but it's probably
> a bad idea, and perhaps could lead to deadlock in the
> out-of-swap-space -> kill a process -> reparent the zombie to init
> path. PS_INMEM will prevent init from being swapped out.

Process kernel stacks swapping, or more explicitely, allowance to page out
threads kernel stacks, is in the kernel. It is performed by vmdaemon,
look for the call to swapout_procs().

Kernel stack contains pcb, but not the struct thread. Notifying the target
process about raised signal requires only struct proc and referenced
structures (p_sigact, p_sigqueue etc) that cannot be paged out.

More interesting propery of the P_SYSTEM process is the immunity to the
oom killer. But vm_pageout_oom() explicitely cares to not kill pid 1
or pid < 48.

P.S. Your Mail-Followup-To: header may be considered offensive.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-all/attachments/20090126/0e25e9e1/attachment.pgp


More information about the svn-src-all mailing list