From owner-freebsd-questions@FreeBSD.ORG Sun Mar 15 09:13:03 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C054910657D6 for ; Sun, 15 Mar 2009 09:13:03 +0000 (UTC) (envelope-from cpghost@cordula.ws) Received: from fw.farid-hajji.net (fw.farid-hajji.net [213.146.115.42]) by mx1.freebsd.org (Postfix) with ESMTP id 6C6428FC26 for ; Sun, 15 Mar 2009 09:13:03 +0000 (UTC) (envelope-from cpghost@cordula.ws) Received: from phenom.cordula.ws (phenom [192.168.254.60]) by fw.farid-hajji.net (Postfix) with ESMTP id 02B0C33A2D; Sun, 15 Mar 2009 10:13:01 +0100 (CET) Date: Sun, 15 Mar 2009 10:13:01 +0100 From: cpghost To: freebsd-questions@freebsd.org Message-ID: <20090315091301.GB1051@phenom.cordula.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) Subject: Speeding up exit(2)? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Mar 2009 09:13:04 -0000 I've noticed that when a huge, partially or totally swapped out process exits, there is a lot of disk activity going on, before the process truly dies. This is not necessarily due to sync(2), because it also happens with CPU bound processes that write very little output. Not sure what's really going on there, but apparently, the process reads in pages from swap that have been paged out previously (according to top(1)). Couldn't this be avoided and the paged out pages simply discarded without reading them back in? Or do those pages contain necessary data at this point (page directories etc.)? -cpghost. -- Cordula's Web. http://www.cordula.ws/