Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 25 Jul 2001 00:02:07 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 25 Jul 2001 00:01:58 -0400 Received: from perninha.conectiva.com.br ([200.250.58.156]:58123 "HELO perninha.conectiva.com.br") by vger.kernel.org with SMTP id ; Wed, 25 Jul 2001 00:01:48 -0400 Date: Tue, 24 Jul 2001 23:31:32 -0300 (BRT) From: Marcelo Tosatti To: Daniel Phillips Cc: linux-kernel@vger.kernel.org, Rik van Riel , Ben LaHaise , Mike Galbraith Subject: Re: [RFC] Optimization for use-once pages In-Reply-To: <01072405473005.00301@starship> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Original-Recipient: rfc822;linux-kernel-outgoing On Tue, 24 Jul 2001, Daniel Phillips wrote: > --- ../2.4.5.clean/mm/vmscan.c Sat May 26 02:00:18 2001 > +++ ./mm/vmscan.c Mon Jul 23 17:25:27 2001 > @@ -359,10 +359,10 @@ > } > > /* Page is or was in use? Move it to the active list. */ > - if (PageReferenced(page) || page->age > 0 || > - (!page->buffers && page_count(page) > 1)) { > + if (PageReferenced(page) || (!page->buffers && page_count(page) > 1)) { > del_page_from_inactive_clean_list(page); > add_page_to_active_list(page); > + page->age = PAGE_AGE_START; > continue; > } > > @@ -462,11 +462,11 @@ > } > > /* Page is or was in use? Move it to the active list. */ > - if (PageReferenced(page) || page->age > 0 || > - (!page->buffers && page_count(page) > 1) || > + if (PageReferenced(page) || (!page->buffers && page_count(page) > 1) || > page_ramdisk(page)) { > del_page_from_inactive_dirty_list(page); > add_page_to_active_list(page); > + page->age = PAGE_AGE_START; > continue; > } That change will cause problems: we indicate that a page is young due to a young mapped pte by increasing its age (at swap_out()). With the current way of doing things, if you don't move higher aged pages from the inactive lists to the active list you'll have severe problems because of that (inactive list full of unfreeable pages due to mapped pte's). I suggest you to change if (!page->buffers && page_count(page) > 1) to if ((page_count(page) - !!page->buffers) > 1) at page_launder/reclaim_page to fix that problem. This way we end up moving all pages with additional references ignoring the buffers to the active list. We have to unmap all references to a page before being able to make it reclaimable clean cache anyway, so there is no real point keeping those pages at the inactive list. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/