From: Nick Piggin Subject: Re: [RFC PATCH 30/35] Add generic_page_range() function Date: Thu, 23 Mar 2006 11:26:35 +1100 Message-ID: <4421EB3B.90804@yahoo.com.au> References: <20060322063040.960068000@sorel.sous-sol.org> <20060322063805.741915000@sorel.sous-sol.org> <44213333.6030404@yahoo.com.au> <79fcd3fd1d13741c5d1cd3c6f5b326b9@cl.cam.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <79fcd3fd1d13741c5d1cd3c6f5b326b9@cl.cam.ac.uk> Sender: linux-kernel-owner@vger.kernel.org To: Keir Fraser Cc: virtualization@lists.osdl.org, Ian Pratt , xen-devel@lists.xensource.com, linux-kernel@vger.kernel.org, Chris Wright List-Id: xen-devel@lists.xenproject.org Keir Fraser wrote: >> lastly, you don't allow any control over the type of pages that are >> walked: this could well be unusably slow for some cases. At least >> you should proably design the interface so we can iterate over >> present, not present, all, etc so it becomes widely usable. Normally >> I'd say to wait until users come up but in this case the function >> isn't a speed demon anyway, and you also don't want to give people >> any excuses not to use it. > > > You mean iterate only over PTEs that are already present, or only those > that were *not* previously present, or all (present and non-present)? Is > that really useful? If so then yes, it's not hard to add. > Yes. If you look at all the code that walks pagetables (including those that just operate on a single pte) in arch/ and other places, there is a fair diversity. A function called generic_page_range() would surely be able to replace all those ;) -- SUSE Labs, Novell Inc. Send instant messages to your online friends http://au.messenger.yahoo.com