From owner-freebsd-hackers Thu Sep 18 12:58:42 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id MAA02167 for hackers-outgoing; Thu, 18 Sep 1997 12:58:42 -0700 (PDT) Received: from dyson.iquest.net (dyson.iquest.net [198.70.144.127]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id MAA02155 for ; Thu, 18 Sep 1997 12:58:39 -0700 (PDT) Received: (from root@localhost) by dyson.iquest.net (8.8.6/8.8.5) id OAA02861; Thu, 18 Sep 1997 14:58:31 -0500 (EST) From: "John S. Dyson" Message-Id: <199709181958.OAA02861@dyson.iquest.net> Subject: Re: LRU implementation In-Reply-To: <19970918131859.14824.qmail@hotmail.com> from Douglas Jardine at "Sep 18, 97 06:18:59 am" To: djardine@hotmail.com (Douglas Jardine) Date: Thu, 18 Sep 1997 14:58:31 -0500 (EST) Cc: toor@dyson.iquest.net, hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL31 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Douglas Jardine said: > > > >>From toor@dyson.iquest.net Mon Sep 15 13:02:41 1997 > >> > >None of the above. One way to describe it is "Not used recently > >very often" :-). There are 2nd chance FIFO queues also. > > Umm. Can somebody please interpret this for me! I assume FreeBSD > looks at the referenced bit to decide the "not used recently" part, > but how does the "very often" part work? Where do the FIFO queues > fit in the overall scheme? (If this is explained someplace a pointer > will suffice). > Take a look at the pageout daemon in /sys/vm/vm_pageout.c. It is pretty complex to describe in words (and would likely take several pages of pseudo-code.) There is also a bit of code in vm_page.c that creates the paging policy. > > I am not very familiar with 2nd-Chance FIFOs so can somebody elaborate? > As Joerg points out, on i386 the referenced bit is > supported by hardware. But that by itself can't be used to construct > a FIFO. So how is the FIFO formed? Once the FIFO is formed, I guess > second chance would mean don't throw away the pages with referenced > bit set. What is done with these pages - i.e. are they queued to the > tail of the FIFO or left in place or ...? > Actually, our code is ready also to support machines w/o referenced bits. -- John dyson@freebsd.org jdyson@nc.com