From owner-freebsd-current@FreeBSD.ORG Sun Jun 5 06:16:36 2005 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D5C9416A41C for ; Sun, 5 Jun 2005 06:16:36 +0000 (GMT) (envelope-from andy@siliconlandmark.com) Received: from lexi.siliconlandmark.com (lexi.siliconlandmark.com [209.69.98.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 743D543D48 for ; Sun, 5 Jun 2005 06:16:36 +0000 (GMT) (envelope-from andy@siliconlandmark.com) Received: from lexi.siliconlandmark.com (localhost [127.0.0.1]) by lexi.siliconlandmark.com (8.13.3/8.13.3) with ESMTP id j556GXu7065693; Sun, 5 Jun 2005 02:16:33 -0400 (EDT) (envelope-from andy@siliconlandmark.com) Received: from localhost (andy@localhost) by lexi.siliconlandmark.com (8.13.3/8.13.3/Submit) with ESMTP id j556GUGi065685; Sun, 5 Jun 2005 02:16:32 -0400 (EDT) (envelope-from andy@siliconlandmark.com) X-Authentication-Warning: lexi.siliconlandmark.com: andy owned process doing -bs Date: Sun, 5 Jun 2005 02:16:30 -0400 (EDT) From: Andre Guibert de Bruet To: Jake Burkholder In-Reply-To: <42A1E579.1020704@locore.ca> Message-ID: <20050605021008.L42933@lexi.siliconlandmark.com> References: <20050601000203.D69811@lexi.siliconlandmark.com> <42A1E579.1020704@locore.ca> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Information: Please contact the ISP for more information X-SL-MailScanner: Found to be clean X-SL-SpamCheck: not spam, SpamAssassin (score=-2.535, required 6, autolearn=not spam, AWL 0.06, BAYES_00 -2.60) X-MailScanner-From: andy@siliconlandmark.com Cc: current@freebsd.org Subject: Re: [RFC] [PATCH] VM & VFS changes X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jun 2005 06:16:36 -0000 On Sat, 4 Jun 2005, Jake Burkholder wrote: > Andre Guibert de Bruet wrote: > >> Index: vm/swap_pager.c >> =================================================================== >> RCS file: /home/ncvs/src/sys/vm/swap_pager.c,v >> retrieving revision 1.273 >> diff -u -r1.273 swap_pager.c >> --- vm/swap_pager.c 20 May 2005 21:26:05 -0000 1.273 >> +++ vm/swap_pager.c 24 May 2005 02:21:30 -0000 >> @@ -2193,6 +2193,60 @@ >> return (error); >> } >> > [...] >> + >> + mtx_lock(&sw_dev_mtx); >> + TAILQ_REMOVE(&swtailq, sp, sw_list); >> + >> + sp = TAILQ_FIRST(&swtailq); >> + free(sp, M_VMPGDATA); >> + } >> > It looks like the free should be before sp = TAILQ_FIRST() instead of after. Good catch! I did not catch this in my testing because I only have one swapdev configured on my test machine. I will add this to my test plan. Meanwhile, I updated the patch. I am still working on the other proposed changes. I will probably keep this new version of the patch around for reference when I make the "final" set of diffs available. Thanks! Andy /* Andre Guibert de Bruet * 6f43 6564 7020 656f 2e74 4220 7469 6a20 */ /* Code poet / Sysadmin * 636f 656b 2e79 5320 7379 6461 696d 2e6e */ /* GSM: +1 734 846 8758 * 5520 494e 2058 6c73 7565 6874 002e 0000 */ /* WWW: siliconlandmark.com * Tormenting bytes since 1980. */