From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mick Jordan Subject: Re: Design question for PV superpage support Date: Mon, 02 Mar 2009 10:02:09 -0800 Message-ID: <49AC1F21.7080309@Sun.COM> References: Reply-To: Mick.Jordan@sun.com Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1606759549==" Return-path: In-reply-to: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: Dave McCracken , Xen Developers List List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --===============1606759549== Content-type: multipart/alternative; boundary="Boundary_(ID_d/FBunSq2V+JayQANIRmvQ)" This is a multi-part message in MIME format. --Boundary_(ID_d/FBunSq2V+JayQANIRmvQ) Content-type: text/plain; charset=US-ASCII; format=flowed Content-transfer-encoding: 7BIT On 03/02/09 09:06, Keir Fraser wrote: > On 02/03/2009 16:43, "Mick Jordan" wrote: > > >> On 03/02/09 05:54, Dave McCracken wrote: >> >>> The solution I am working on for how to support Linux hugepages (Xen >>> superpages) involves creating domains made up entirely of superpages. I can >>> create a working domain with superpages and am in the process of supporting >>> it in save/restore. >>> >>> >> This wouldn't work too well for me in the case of thread stacks because >> we need to map out parts of the stack and, although we want large >> virtual stacks, we don't want do dedicate that much physical memory. Is >> it really difficult to support mixed pages sizes in the general case, >> e.g., save/restore etc.? >> > > You can still make 4kB mappings of subsections of 2MB physical extents. And > the guest kernel will still be able to allocate subsections of 2MB physical > extents for various uses. Isn't that all you need for e.g., this thread > stack situation? > > Yes, that would work. Assuming it doesn't cause problems in other ways, e.g. save/restore, given that this re-introduces mixed mappings. I'd appreciate someone explaining the problems for save/restore with the earlier patch that simply allowed 2MB pages in PTEs. > Presumably Dave McCracken will be implementing a 'best effort' mode for > domains where we try to allocate superpages but we get by at reduced > performance if we have to allocate some discontiguous extents due to lack of > contiguous available memory. That would be reasonably sensible. > > Indeed. Mick --Boundary_(ID_d/FBunSq2V+JayQANIRmvQ) Content-type: text/html; charset=US-ASCII Content-transfer-encoding: 7BIT On 03/02/09 09:06, Keir Fraser wrote:
On 02/03/2009 16:43, "Mick Jordan" <Mick.Jordan@sun.com> wrote:

  
On 03/02/09 05:54, Dave McCracken wrote:
    
The solution I am working on for how to support Linux hugepages (Xen
superpages) involves creating domains made up entirely of superpages.  I can
create a working domain with superpages and am in the process of supporting
it in save/restore.
  
      
This wouldn't work too well for me in the case of thread stacks because
we need to map out parts of the stack and, although we want large
virtual stacks, we don't want do dedicate that much physical memory. Is
it really difficult to support mixed pages sizes in the general case,
e.g., save/restore etc.?
    

You can still make 4kB mappings of subsections of 2MB physical extents. And
the guest kernel will still be able to allocate subsections of 2MB physical
extents for various uses. Isn't that all you need for e.g., this thread
stack situation?

  
Yes, that would work. Assuming it doesn't cause problems in other ways, e.g. save/restore, given that this re-introduces mixed mappings. I'd appreciate someone explaining the problems for save/restore with the earlier patch that simply allowed 2MB pages in PTEs.
Presumably Dave McCracken will be implementing a 'best effort' mode for
domains where we try to allocate superpages but we get by at reduced
performance if we have to allocate some discontiguous extents due to lack of
contiguous available memory. That would be reasonably sensible.

  
Indeed.
Mick

--Boundary_(ID_d/FBunSq2V+JayQANIRmvQ)-- --===============1606759549== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============1606759549==--