From owner-freebsd-questions@FreeBSD.ORG Fri Dec 27 13:36:18 2013 Return-Path: Delivered-To: freebsd-questions@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 6780EA80 for ; Fri, 27 Dec 2013 13:36:18 +0000 (UTC) Received: from mail-wg0-x22c.google.com (mail-wg0-x22c.google.com [IPv6:2a00:1450:400c:c00::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F33741082 for ; Fri, 27 Dec 2013 13:36:17 +0000 (UTC) Received: by mail-wg0-f44.google.com with SMTP id a1so8033623wgh.23 for ; Fri, 27 Dec 2013 05:36:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=date:from:to:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; bh=Cdf0uinE3dPYXuV+wm9zfgHSfwOzHIishz1iaejucJk=; b=0SfU3w10fVbsryHfmt0xDRHs6UP4saRtYqjV2ogAKPOULxAGkAZrAN0CzNXVyTZtJZ aeaIBJ/hG5joLpAsZ9mxRlQ4pjzb1o4sjHXOK523KTVhmeI/2Xc1wavFsusGTkShdK6G 3cVQVfM5r1EAwu7htIO4+oVMQzxKB3guK2j9pAOBvp6Qcen+1NES8S2o/9Kae0AC2Fyw hy3L79S6u/GAVCLVePCpw/FXEBfTZDEU4eWCsX6j6EHxNqRWcJZphiKuQqQtDEXJXMHE 6Qhf45avY6T3wfHBpAaKP3NJ6yHlFlRNBU1gR/GAOMxoSzubONTNvNYytuYKG4jF+gDj nHQw== X-Received: by 10.180.95.162 with SMTP id dl2mr33570041wib.17.1388151376237; Fri, 27 Dec 2013 05:36:16 -0800 (PST) Received: from gumby.homeunix.com (87-194-105-247.bethere.co.uk. [87.194.105.247]) by mx.google.com with ESMTPSA id jv5sm19222007wjc.1.2013.12.27.05.36.14 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Fri, 27 Dec 2013 05:36:15 -0800 (PST) Date: Fri, 27 Dec 2013 13:36:13 +0000 From: RW To: freebsd-questions@freebsd.org Subject: Re: exit(2) and swap Message-ID: <20131227133613.0252110f@gumby.homeunix.com> In-Reply-To: <52BCE9C6.50603@cordula.ws> References: <52BCE9C6.50603@cordula.ws> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.22; amd64-portbld-freebsd10.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2013 13:36:18 -0000 On Fri, 27 Dec 2013 03:45:26 +0100 cpghost wrote: > Hello, > > I'm wondering (again) how exit(2) and swap interact. > > I have some process (rtin from ports/tin) taking a LONG > time to exit, if it has a lot of pages swapped out. > Looking at top(1), it seems as if that process tries to > swap pages in again from disk, before shutting down. > > Is it just rtin doing something funny before exiting, > or is that a general problem with FreeBSD's exit(2) > implementation? I think this commonly happens to some extent when a program shuts down cleanly. Some pages need to be read at shut-down, often a lot of destructors (or equivalent) get run that do a lot of gratuitous cleaning-up.