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] Improved patches of upstreaming grant table version 2

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, jeremy@xxxxxxxx
Subject: [Xen-devel] Improved patches of upstreaming grant table version 2
From: annie li <annie.li@xxxxxxxxxx>
Date: Wed, 16 Nov 2011 20:55:39 +0800
Cc: Kurt Hackel <Kurt.Hackel@xxxxxxxxxx>, Paul Durrant <paul.durrant@xxxxxxxxxx>, Ian.Campbell@xxxxxxxxxx
Delivery-date: Wed, 16 Nov 2011 04:56:53 -0800
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>
Organization: Oracle Corporation
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.9 (Windows/20061207)
Hi

The following patches introduce and implement grant table version 2. They are improved from my previous patches and based on v3.2.0-rc1+.

Descriptions for those patches:

1. In those patches, the grant table code supports both grant table v1 and v2 version, v2 is an extension from v1. Grant table of guest domain can be either v1 or v2 version, and every grant table entry on one guest should be the same version.

2. Full page structure of grant table v2 play the same role as grant table v1. Although full page structure is different from v1, grant table 2 is totally backwards compatible with v1. Grant table is shared between guest and Xen, domu and dom0 all have their own grant table shared with Xen, and their grant table version should be set before any grants are activated. When domu grants an entry to dom0 to map a frame, following are steps:
* domu introduces a grant entry by reference
* domu informs dom0 the gref
* dom0 sends hypercall to map frame through this reference, Xen copy shared entry to active entry and update frame
* dom0 does its work and release the frame, Xen releases the entry.
* domu redo those steps for a new cycle.

Xen mapping process can be found in function __gnttab_map_grant_ref in link: http://xenbits.xen.org/hg/xen-4.1-testing.hg/file/81e39a4978ea/xen/common/grant_table.c#l2172

3. If dom0 supports grant table v2, guests run on it can either supports v1 or v2. Xen is responsible to judge what version the guests are using. This is implemented in link: http://xenbits.xen.org/hg/xen-4.1-testing.hg/file/81e39a4978ea/xen/common/grant_table.c#l2172. Key word is:  rd->grant_table->gt_version.

4. Grant table v2 has been supported by Xen for a long time, and receiver-side copying mechanism bases on this implementation. Netback and netfront driver can pick up this new feature to get better network performance and better CPU accounting.
Thanks
Annie
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel