From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeremy Fitzhardinge Subject: Re: [patch 15/26] Xen-paravirt_ops: Add apply_to_page_range() which applies a function to a pte range. Date: Fri, 16 Mar 2007 10:08:43 -0700 Message-ID: <45FACF1B.5010709@goop.org> References: <20070301232443.195603797@goop.org> <20070301232528.155002121@goop.org> <20070316091940.GJ23174@elte.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20070316091940.GJ23174@elte.hu> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ingo Molnar Cc: Zachary Amsden , xen-devel@lists.xensource.com, Ian Pratt , virtualization@lists.osdl.org, Rusty Russell , linux-kernel@vger.kernel.org, Chris Wright , Andi Kleen , Andrew Morton , Christoph Lameter , Christian Limpach List-Id: virtualization@lists.linuxfoundation.org Ingo Molnar wrote: > nice one! I suspect we could simplify some of the less > performance-critical open-coded pagetable walker loops in the kernel > with this? (i'm not even sure it's all that much of a performance loss > to pass a function pointer around - would be nice to convert say > mprotect() to this and see the performance difference?) > apply_page_to_range has the side-effect of allocating all the pagetable levels for the address range it walks. Xen uses this to populate pagetables (for example, build out the pagetable, and let the hypervisor plug a mapping into the pte page). If that's OK for the other uses, then it should be good. J