WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [RFC PATCH 30/35] Add generic_page_range() function

To: Chris Wright <chrisw@xxxxxxxxxxxx>
Subject: [Xen-devel] Re: [RFC PATCH 30/35] Add generic_page_range() function
From: Nick Piggin <nickpiggin@xxxxxxxxxxxx>
Date: Wed, 22 Mar 2006 22:21:23 +1100
Cc: virtualization@xxxxxxxxxxxxxx, Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, Ian Pratt <ian.pratt@xxxxxxxxxxxxx>
Delivery-date: Wed, 22 Mar 2006 12:38:09 +0000
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.au; h=Received:Message-ID:Date:From:User-Agent:X-Accept-Language:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=gA+S5NeayQxSGyNC1pA6zFn2w5H0WW681Cku3kTz3dEFRBCuteP8hQRhYkMVDAG4XC5HZ578HpqxVw8tiAOYXsSA6H6zmepdpvyGY6rXqiXo7FQvTPfcmLns7tsDglArvq0PT/imSltciqZ3Rpc7A0gmn82+MxobbngtoXg1F64= ;
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20060322063805.741915000@xxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20060322063040.960068000@xxxxxxxxxxxxxxxxxx> <20060322063805.741915000@xxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20051007 Debian/1.7.12-1
Chris Wright wrote:
Add a new mm function generic_page_range() which applies a given
function to every pte in a given virtual address range in a given mm
structure. This is a generic alternative to cut-and-pasting the Linux
idiomatic pagetable walking code in every place that a sequence of
PTEs must be accessed.

Although this interface is intended to be useful in a wide range of
situations, it is currently used specifically by several Xen
subsystems, for example: to ensure that pagetables have been allocated
for a virtual address range, and to construct batched special
pagetable update requests to map I/O memory (in ioremap()).


I raised the idea when we were tossing around ideas for the page
table walking crapectomy. Of course it was rejected due to use of
the indirect function, however I gues it makes sense for code
outside mm/

Couple of issues with the current code though:

firstly, the name.

secondly, I think you confuse our (confusing) terminology: the page
that holds pte_ts is not the pte_page, the pte_page is the page that
a pte points to

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.

--
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>