Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Jan 2014 11:42:10 -0500
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-stable@freebsd.org
Cc:        Ronald Klop <ronald-lists@klop.ws>
Subject:   Re: Processes are incorrectly marked as swapped out
Message-ID:  <201401281142.10317.jhb@freebsd.org>
In-Reply-To: <op.w9446fkykndu52@ronaldradial.radialsg.local>
References:  <2D47B79E-C171-4B91-B0AB-4DD2212770C6@gmail.com> <op.w9446fkykndu52@ronaldradial.radialsg.local>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday, January 23, 2014 8:02:29 am Ronald Klop wrote:
> On Thu, 23 Jan 2014 13:19:36 +0100, Dmitry Sivachenko  
> <trtrmitya@gmail.com> wrote:
> 
> > Hello!
> >
> > After upgrade from stable/9 to stable/10 I see the following regression.
> > Some processes are marked as swapped out in top(1) output:
> >
> >  1436 root            1  43    0 16524K     0K nanslp 14   1:14   0.00%  
> > <cron>
> >  1381 smmsp           1  20    0 23988K     0K pause  18   0:04   0.00%  
> > <sendma
> > 99348 mitya           1  21    0 23492K     0K pause  16   0:00   0.00%  
> > <csh>
> >
> > ps(1) also shows them as swapped out (W as second character in state  
> > field):
> >  1381  -  IWs       0:00.00 sendmail: Queue runner at 00:30:00 for  
> > /var/spool/clie
> >  1436  -  IWs       0:00.00 /usr/sbin/cron -s
> > 80231  -  IWs       0:00.00 /usr/local/sbin/collectdmon -c  
> > /usr/local/sbin/coll
> > 99348  1  IWs       0:00.00 -csh (csh)
> >
> > Though swapinfo reports that zero swap is used and even if I turn swap  
> > completely off (swapoff -a)
> > the output of both top(1) and ps(1) does not change: these processes are  
> > still marked as swapped out.
> 
> The code of an application can get removed from memory, because there  
> still is an image of it in the executable on disk. It can be 'swapped' in  
> by reading the executable again. The program is memory mapped (mmap).
> See VN PAGER vs SWAP PAGER in 'systat -vm'.

However, a swapped out process always uses swap (for kernel stacks), so this 
seems like a real bug.

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401281142.10317.jhb>