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

Re: [Xen-devel] PoD in other (not GPLPV) drivers

To: Paul Durrant <Paul.Durrant@xxxxxxxxxx>
Subject: Re: [Xen-devel] PoD in other (not GPLPV) drivers
From: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>
Date: Mon, 28 Feb 2011 14:17:23 +0000
Cc: James Harper <james.harper@xxxxxxxxxxxxxxxx>, xen devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 28 Feb 2011 06:18:22 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=qIwRz7R53nVupwHNRcf8biNQzjOP00omQuiv1XXZtrA=; b=imeOlOYTTKk30/w8ob7YT2uibDxRKe6qn6Gnt3avnpN/JTY2/pONZGKhZt8BVUKBDR 09NBdXwzZJv4dKQBGa+4gZTR1RodxW+3BxZ3+BsriqvNx+qN+aSbjNPbnKeUhTB9cbuE K7rvcu4lb4YO+0eXtvw5DuwzWHDZ8f3t9EzBE=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=FiFOK+eI6/hR07ou/VRHbeXPGoTwr4N5lePuiDhMTE9LoGwRAPSbLPVa0hJyoc8DIe NnTGky9jG86/s2yUGjysygAXOqgGh4BlS95MnYVbMeuLmEGZwXq/q9na1qAkYPvDG4KF 1DXjXHRKDdONNN3aUosZ9r3335cxRMCXt4B/8=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <291EDFCB1E9E224A99088639C47620228D3EDCA7F3@xxxxxxxxxxxxxxxxxxxxxxxxx>
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>
References: <AEC6C66638C05B468B556EA548C1A77D01C559A4@trantor> <AANLkTim0bMXQSVmJD_SoMDkAeh8tq-UR8AJ8WksAwQFn@xxxxxxxxxxxxxx> <291EDFCB1E9E224A99088639C47620228D3EDCA7C9@xxxxxxxxxxxxxxxxxxxxxxxxx> <AEC6C66638C05B468B556EA548C1A77D01C55A30@trantor> <291EDFCB1E9E224A99088639C47620228D3EDCA7F3@xxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Just for the public record: I believe that I have upstreamed all of
the PoD fixes and improvements that we had in the XenServer tree with
one exception: There are a series of patches to improve the "emergency
zero-page sweep" behavior in Xen, particularly for pretty large
(>24GiB) guests.  This is because:
* They were really ugly; hacks upon hacks, not suitable for upstreaming
* As far as I know, they're performance enhancements only, not correctness ones.

It doesn't sound to me like the zero-page sweeps should be involved in
your issue, James.  But if you (or anyone) would like the patches, I'd
be happy to send them along for you to try.  (And for the shy, or
archaeologists looking at this long after I'm gone from Citrix, they
can be found on the XenServer source ISOs.)  I'm not sure they'll
apply cleanly to 4.1, but that code hasn't had a lot of changes, so
you should be able to work out how they apply.

As part of my work to port XenServer to 4.1, I'm going to rewrite the
patches, and I'll upstream them at that time.

 -George

On Mon, Feb 28, 2011 at 1:41 PM, Paul Durrant <Paul.Durrant@xxxxxxxxxx> wrote:
> James,
>
>  Indeed, zero page sweeping is code inside xen that runs if the PoD cache is 
> exhausted. It refills the cache with pages that are zeroed out (replacing 
> them with pod entries in the p2m). Your initial balloon down may well be slow 
> if you (or the windows kernel) touches the page before you hand it back to 
> xen, since the pod code will have to populate each page in the p2m as it is 
> touched.
>
>  Paul
>
>> -----Original Message-----
>> From: James Harper [mailto:james.harper@xxxxxxxxxxxxxxxx]
>> Sent: 28 February 2011 12:29
>> To: Paul Durrant; George Dunlap
>> Cc: xen devel
>> Subject: RE: [Xen-devel] PoD in other (not GPLPV) drivers
>>
>> >
>> > I actually have plans to push it earlier because we balloon down
>> quite
>> late at
>> > the moment (off the back of the START IRP in the top level bus
>> driver). We are
>> > reliant upon zero-page sweeping code in Xen to save us from guest
>> crashing up
>> > to that point.
>> >
>>
>> I've modified GPLPV to balloon down at DriverEntry time, which seems
>> to be early enough. Prior to that, memory=128 and maxmem=1024 was
>> enough to cause a crash under 2008, basically as soon as I tried to
>> access the registry in DriverEntry. My drivers are using WDF and are
>> therefore loading after the KMDF framework which is going to use
>> additional resources. My backup plan is to write a WDM driver that
>> loads even earlier than that and does the allocation, passing it to
>> the real PV drivers later on, although my concern there is that
>> Windows may not like memory allocated by one driver being freed by
>> another...
>>
>> I've never heard of 'zero-page sweeping code' before... is that a
>> way of xen reallocating a previously touched page if it contains all
>> 0's if we want a page beyond our allocation limit? That might
>> explain why my initial balloon down is so slow! I can tell windows
>> to not zero pages before it gives them to me when I do the initial
>> balloon down... what are your thoughts on that? Although it's
>> unlikely at boot time, in theory they could contain sensitive
>> information and I'm supposed to zero them before handing them back
>> to xen according to the docs.
>>
>> James
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
>

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel