From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932967AbXBPGid (ORCPT ); Fri, 16 Feb 2007 01:38:33 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932968AbXBPGid (ORCPT ); Fri, 16 Feb 2007 01:38:33 -0500 Received: from smtp.osdl.org ([65.172.181.24]:53853 "EHLO smtp.osdl.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932967AbXBPGic (ORCPT ); Fri, 16 Feb 2007 01:38:32 -0500 Date: Thu, 15 Feb 2007 22:37:27 -0800 From: Andrew Morton To: Jeremy Fitzhardinge Cc: Andi Kleen , linux-kernel@vger.kernel.org, virtualization@lists.osdl.org, xen-devel@lists.xensource.com, Chris Wright , Zachary Amsden , Ian Pratt , Christian Limpach , Christoph Lameter Subject: Re: [patch 11/21] Xen-paravirt: Add apply_to_page_range() which applies a function to a pte range. Message-Id: <20070215223727.6819f962.akpm@linux-foundation.org> In-Reply-To: <20070216022531.344125142@goop.org> References: <20070216022449.739760547@goop.org> <20070216022531.344125142@goop.org> X-Mailer: Sylpheed version 2.2.7 (GTK+ 2.8.17; x86_64-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 15 Feb 2007 18:25:00 -0800 Jeremy Fitzhardinge wrote: > Add a new mm function apply_to_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()). There was some discussion about this sort of thing last week. The consensus was that it's better to run the callback against a whole pmd's worth of ptes, mainly to amortise the callback's cost (a lot). It was implemented in ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.20/2.6.20-mm1/broken-out/smaps-extract-pmd-walker-from-smaps-code.patch From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [patch 11/21] Xen-paravirt: Add apply_to_page_range() which applies a function to a pte range. Date: Thu, 15 Feb 2007 22:37:27 -0800 Message-ID: <20070215223727.6819f962.akpm@linux-foundation.org> References: <20070216022449.739760547@goop.org> <20070216022531.344125142@goop.org> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20070216022531.344125142@goop.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.osdl.org Errors-To: virtualization-bounces@lists.osdl.org To: Jeremy Fitzhardinge Cc: Chris Wright , Andi Kleen , xen-devel@lists.xensource.com, Christoph Lameter , Ian Pratt , virtualization@lists.osdl.org, linux-kernel@vger.kernel.org List-Id: virtualization@lists.linuxfoundation.org On Thu, 15 Feb 2007 18:25:00 -0800 Jeremy Fitzhardinge wr= ote: > Add a new mm function apply_to_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()). There was some discussion about this sort of thing last week. The consensus was that it's better to run the callback against a whole pmd's worth of ptes, mainly to amortise the callback's cost (a lot). It was implemented in ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.20/2.6.20= -mm1/broken-out/smaps-extract-pmd-walker-from-smaps-code.patch