From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Thu, 15 Feb 2007 21:41:57 -0800 From: Andrew Morton Subject: Re: [RFC] Remove unswappable anonymous pages off the LRU Message-Id: <20070215214157.51a1cdb3.akpm@linux-foundation.org> In-Reply-To: References: <20070215171355.67c7e8b4.akpm@linux-foundation.org> <45D50B79.5080002@mbligh.org> <20070215174957.f1fb8711.akpm@linux-foundation.org> <20070215184800.e2820947.akpm@linux-foundation.org> <20070215191858.1a864874.akpm@linux-foundation.org> <20070215194258.a354f428.akpm@linux-foundation.org> <45D52F89.5020008@redhat.com> <20070216135714.669701b4.kamezawa.hiroyu@jp.fujitsu.com> <20070215211617.a6e1cd5b.akpm@linux-foundation.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org Return-Path: To: Christoph Lameter Cc: KAMEZAWA Hiroyuki , riel@redhat.com, mbligh@mbligh.org, linux-mm@kvack.org, nickpiggin@yahoo.com.au, a.p.zijlstra@chello.nl List-ID: On Thu, 15 Feb 2007 21:25:53 -0800 (PST) Christoph Lameter wrote: > On Thu, 15 Feb 2007, Andrew Morton wrote: > > > hm. We can calculate page_zone(page) from the pfn. And I suspect we can > > do that locklessly too. I bet a nice tight implementation of that would be > > efficient enough and it'll reclaim heaps of flags. > > You mean encode the node and the zone_id in the pfn? Maybe. Or just leave the pfns as they are and implement a decent lookup algorithm. For a pc it'd be something like for (i = ZONE_DMA; i <= ZONE_HIGHMEM; i++) { if (pfn >= first_pfn(i) && pfn <= last_pfn(i)) success(); } if you get my drift. I dunno how complex that would get in the worst cases. > Ummm... That would > get us into lots of trouble with pfn_to_page and friends. > > The sparsemem section field could be available. A virtual > memmap based implementation would not need the section number and would > get rid of the sparsemem table lookups.Problem is that we cannot do it on > 32 bit platforms because of the lack of virtual memory. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org