From owner-freebsd-hackers Sat Jul 13 3:18:28 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B8A4537B400 for ; Sat, 13 Jul 2002 03:18:25 -0700 (PDT) Received: from falcon.mail.pas.earthlink.net (falcon.mail.pas.earthlink.net [207.217.120.74]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4A07B43E67 for ; Sat, 13 Jul 2002 03:18:25 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from pool0019.cvx22-bradley.dialup.earthlink.net ([209.179.198.19] helo=mindspring.com) by falcon.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 17TJyj-0000JH-00; Sat, 13 Jul 2002 03:18:17 -0700 Message-ID: <3D2FFE3D.83E0CCF9@mindspring.com> Date: Sat, 13 Jul 2002 03:17:33 -0700 From: Terry Lambert X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Matthew Dillon Cc: David Schultz , Sean Kelly , hackers@FreeBSD.ORG Subject: Re: swapoff? References: <20020713040247.GA82181@edgemaster.zombie.org> <20020713052337.GA662@HAL9000.wox.org> <20020713053236.GA884@HAL9000.wox.org> <200207130652.g6D6qI93076722@apollo.backplane.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Matthew Dillon wrote: > * Flag the swap device being removed and then scan all OBJT_SWAP > VM Objects looking for swap blocks associated with the device, > and force a page-in of those blocks. The getpages code for the > swap backing store would detect the flag and not clear the swap > bitmap bits as it pages-in the data. > > (Forcing a pagein may force pages to cycle back out to another > swap device, so special treatment of the paged-in pages (like > immediately placing it in the VM page cache instead of the > active or inactive queues) is necessary to reduce load effects > on the system. Uh... so you set the bit that tells you it's allocated to prevent it being allocated? When I swap something in and the bit is set, how do I know that it's in, except that it's not allocated? In other words, I do what you say... how do I know when the device has been drained out, vs. being in use? I think you have to disable swapping to the device some other way, and then return fromt he "swapoff" only when the bitmap is all zero. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message