From owner-freebsd-stable@FreeBSD.ORG Tue Jan 28 22:37:38 2014 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CD5339D1 for ; Tue, 28 Jan 2014 22:37:38 +0000 (UTC) Received: from smtp.syd.comcen.com.au (smtp.syd.comcen.com.au [203.23.236.77]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 47BCB1119 for ; Tue, 28 Jan 2014 22:37:37 +0000 (UTC) Received: from hummer.af.speednet.com.au (115-69-4-237.dyn.comcen.net.au [115.69.4.237]) by smtp.syd.comcen.com.au (8.13.4/8.12.9) with ESMTP id s0SMXZeJ064656 for ; Wed, 29 Jan 2014 09:33:35 +1100 (EST) Received: from snuggles.af.speednet.com.au (snuggles.af.speednet.com.au [172.22.2.2]) by hummer.af.speednet.com.au (8.14.5/8.14.5) with ESMTP id s0SMXU6Z026108 for ; Wed, 29 Jan 2014 08:33:30 +1000 (EST) (envelope-from andyf@andyit.com.au) Message-ID: <52E8303A.9020501@andyit.com.au> Date: Wed, 29 Jan 2014 08:33:30 +1000 From: Andy Farkas User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120614 Thunderbird/13.0 MIME-Version: 1.0 To: freebsd-stable@freebsd.org Subject: Re: Processes are incorrectly marked as swapped out References: <2D47B79E-C171-4B91-B0AB-4DD2212770C6@gmail.com> <201401281142.10317.jhb@freebsd.org> In-Reply-To: <201401281142.10317.jhb@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-comcen-MailScanner-Information: Please contact the ISP for more information X-comcen-MailScanner: Found to be clean X-comcen-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-0.088, required 4, AWL -0.18, BAYES_20 -0.01, RDNS_DYNAMIC 0.10) X-comcen-MailScanner-From: andyf@andyit.com.au X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jan 2014 22:37:38 -0000 On 29/01/14 02:42, John Baldwin wrote: > On Thursday, January 23, 2014 8:02:29 am Ronald Klop wrote: >> On Thu, 23 Jan 2014 13:19:36 +0100, Dmitry Sivachenko >> 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% >>> >>> 1381 smmsp 1 20 0 23988K 0K pause 18 0:04 0.00% >>> >> 99348 mitya 1 21 0 23492K 0K pause 16 0:00 0.00% >>> >>> >>> 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. > Probably not related, but on a VirtualBox VM guest running: FreeBSD 10.0-STABLE (GENERIC) #0 r261215: Tue Jan 28 18:13:37 EST 2014 having been freshly rebooted: % uptime 7:59AM up 43 secs, 2 users, load averages: 0.79, 0.30, 0.11 I see this strange anomaly in the "TIME" column of top(1): % top -CHSb -otime | grep swap 0 root -16 0 0K 160K swapin 0 47.8H 0.00% kernel{swapper} No swap is being used (of ~3GB). Filesystem is UFS. Possibly a formatting error although earlier values have been 45.4H & 47.2H with reboots in between. -andyf