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] (no subject)

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] (no subject)
From: Keshav Darak <keshav_darak@xxxxxxxxx>
Date: Sun, 20 Mar 2011 15:27:40 -0700 (PDT)
Cc: jeremy@xxxxxxxx, keir@xxxxxxx
Delivery-date: Sun, 20 Mar 2011 15:29:17 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1300660061; bh=s2HSyS186po6y8xi4CWipqps/CL8/SZ5iBGc9Qpfps8=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:To:Cc:MIME-Version:Content-Type; b=2bP5DiHPapGvX0odU+620jhc/yyp+X+DKdwf6tTkJ4BAzNVGdday6L68jc2qKtO6Lojrn+2ZpSzxKYI46iwjbaI/p+o4E6H4xprrb6hA7wj6ecTeB04W+97k5983khSG7L2C9/yFBvJvqzcVVYAreDfEQ2VV8VLKcFQsBHlRn04=
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:To:Cc:MIME-Version:Content-Type; b=YRbJKESVCv0CxFiLRPW9iUvYiAAaneaEXDi1YwQ+aXmbapOA9TdFVwyelGnJmbajhv2HeKLIwqdJbLiuVQR58hUZvUo5yXnRY1wBC4UAJZp2/2q0R74G99Zelhk0C1z0pZFvqhTcrUYmB7ZjOgoOSoDxbO2XUOER0WdU4VQV85U=;
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
We have implemented hugepage support for guests in following manner

In our implementation we added a parameter hugepage_num which is specified in the config file of the DomU. It is the number of hugepages that the guest is guaranteed to receive whenever the kernel asks for hugepage by using its boot time parameter or reserving after booting (eg. Using echo XX > /proc/sys/vm/nr_hugepages). During creation of the domain we reserve MFN's for these hugepages and store them in the list. The listhead of this list is inside the domain structure with name "hugepage_list". When the domain is booting, at that time the memory seen by the kernel is allocated memory  less the amount required for hugepages. The function reserve_hugepage_range is called as a initcall. Before this function the xen_extra_mem_start points to this apparent end of the memory. In this function we reserve the PFN range for the hugepages which are going to be allocated by kernel by incrementing the xen_extra_mem_start. We maintain these PFNs as pages in "xen_hugepfn_list" in the kernel.

Now before the kernel requests for hugepages, it makes a hypercall HYPERVISOR_memory_op  to get count of hugepages allocated to it and accordingly reserves the pfn range.
then whenever kernel requests for hugepages it again make hypercall HYPERVISOR_memory_op to get the preallocated hugepage and according makes the p2m mapping on both sides (xen as well as kernel side)

The approach can be better explained using the presentation attached.

--
Keshav Darak

 

Attachment: xen_patch_210311_0227.patch
Description: application/download

Attachment: jeremy-kernel.patch
Description: application/download

Attachment: our_hugepage_approach.ppt
Description: MS-Powerpoint presentation

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] (no subject), Keshav Darak <=