From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751686AbXBPXbG (ORCPT ); Fri, 16 Feb 2007 18:31:06 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1946285AbXBPXbG (ORCPT ); Fri, 16 Feb 2007 18:31:06 -0500 Received: from mta2.cl.cam.ac.uk ([128.232.0.14]:57158 "EHLO mta2.cl.cam.ac.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751686AbXBPXbF (ORCPT ); Fri, 16 Feb 2007 18:31:05 -0500 User-Agent: Microsoft-Entourage/11.3.3.061214 Date: Fri, 16 Feb 2007 23:29:57 +0000 Subject: Re: [Xen-devel] Re: [patch 12/21] Xen-paravirt: Allocate and free vmalloc areas From: Keir Fraser To: Jeremy Fitzhardinge CC: Keir Fraser , Ian Pratt , , Chris Wright , , Andrew Morton , , Jan Beulich , Andi Kleen Message-ID: Thread-Topic: [Xen-devel] Re: [patch 12/21] Xen-paravirt: Allocate and free vmalloc areas Thread-Index: AcdSIl5unR3Zsr4VEduoPQAWy6hiGQ== In-Reply-To: <45D60569.2050702@goop.org> 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 16/2/07 19:26, "Jeremy Fitzhardinge" wrote: > Keir Fraser wrote: >> Hmmm... Actually looks like a bunch of architectures do lazy sync of the >> vmalloc area, although neither ia64 nor powerpc does so. However, all >> current users of the alloc_vm_area() function would be okay since none of >> the other lazy-syncing architectures are supported by Xen. >> > > Well, assuming that alloc_vm_area() has some non-Xen use, the right > thing is for archs to export vmalloc_sync_all(), and just use that from > common code. It has no other users right now and get_vm_area_sync() would be a better-named and more generically useful function than alloc_vm_area(). But yes, to be done properly it does require vmalloc_sync_all() to be defined by all architectures (even if that's BUG() and implement-properly-on-demand). get_vm_area_sync(), partnered with existing remove_vm_area(), just seems much smaller and neater than adding four new functions with a more complex usage: alloc_vm_area, {lock,unlock}_vm_area, and free_vm_area. Maybe keeping free_vm_area() too makes sense as its interface is more neatly symmetrical to that of get_vm_area(). -- Keir From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: Re: [patch 12/21] Xen-paravirt: Allocate and free vmalloc areas Date: Fri, 16 Feb 2007 23:29:57 +0000 Message-ID: References: <45D60569.2050702@goop.org> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <45D60569.2050702@goop.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jeremy Fitzhardinge Cc: xen-devel@lists.xensource.com, virtualization@lists.osdl.org, linux-kernel@vger.kernel.org, Jan Beulich , Chris Wright , Ian Pratt , Andrew Morton , Keir Fraser , Andi Kleen List-Id: virtualization@lists.linuxfoundation.org On 16/2/07 19:26, "Jeremy Fitzhardinge" wrote: > Keir Fraser wrote: >> Hmmm... Actually looks like a bunch of architectures do lazy sync of the >> vmalloc area, although neither ia64 nor powerpc does so. However, all >> current users of the alloc_vm_area() function would be okay since none of >> the other lazy-syncing architectures are supported by Xen. >> > > Well, assuming that alloc_vm_area() has some non-Xen use, the right > thing is for archs to export vmalloc_sync_all(), and just use that from > common code. It has no other users right now and get_vm_area_sync() would be a better-named and more generically useful function than alloc_vm_area(). But yes, to be done properly it does require vmalloc_sync_all() to be defined by all architectures (even if that's BUG() and implement-properly-on-demand). get_vm_area_sync(), partnered with existing remove_vm_area(), just seems much smaller and neater than adding four new functions with a more complex usage: alloc_vm_area, {lock,unlock}_vm_area, and free_vm_area. Maybe keeping free_vm_area() too makes sense as its interface is more neatly symmetrical to that of get_vm_area(). -- Keir