From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Sat, 3 Apr 2004 12:02:27 -0800 From: Andrew Morton Subject: Re: [RFC][PATCH 1/3] radix priority search tree - objrmap complexity fix Message-Id: <20040403120227.398268aa.akpm@osdl.org> In-Reply-To: <20040403174043.GK2307@dualathlon.random> References: <20040402001535.GG18585@dualathlon.random> <20040402011627.GK18585@dualathlon.random> <20040401173649.22f734cd.akpm@osdl.org> <20040402020022.GN18585@dualathlon.random> <20040402104334.A871@infradead.org> <20040402164634.GF21341@dualathlon.random> <20040403174043.GK2307@dualathlon.random> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org Return-Path: To: Andrea Arcangeli Cc: hch@infradead.org, hugh@veritas.com, vrajesh@umich.edu, linux-kernel@vger.kernel.org, linux-mm@kvack.org List-ID: Andrea Arcangeli wrote: > > > I'm very convinced that the alloc_pages API should be the same for all > archs w/o or w/ MMU, and I'm fine if we want to make the non-compound > retval the default (and change __GFP_NO_COMP to __GFP_COMP) in the long > run (to optimize all callers but hugetlbfs). For the short term > __GFP_NO_COMP and compound being the default is the safest (for all > archs). This single patch which enables the compound page logic in get_page()/put_page(): --- 25/include/linux/mm.h~a 2004-04-03 11:50:56.900246584 -0800 +++ 25-akpm/include/linux/mm.h 2004-04-03 11:50:59.189898504 -0800 @@ -236,7 +236,7 @@ struct page { extern void FASTCALL(__page_cache_release(struct page *)); -#ifdef CONFIG_HUGETLB_PAGE +#ifndef CONFIG_HUGETLB_PAGE static inline int page_count(struct page *p) { Increases a 3.5MB vmlinux by 15kB, a lot of it fastpath. We should retain this optimisation. It might be better to switch over to address masking in get_user_pages() and just dump all the compound page logic. I don't immediately see how the get_user_pages() caller can subsequently do put_page() against the correct pageframe, but I assume you worked that out? -- 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: aart@kvack.org