From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Deegan Subject: Re: [PATCH 1 of 4 RFC] xen, p2m: get_entry returns level of entry as well Date: Thu, 14 Jun 2012 16:31:35 +0100 Message-ID: <20120614153135.GH90181@ocelot.phlegethon.org> References: <672e9628f27845d24a3f.1339156491@elijah> <20120614102116.GH82539@ocelot.phlegethon.org> <4FD9FCAF.4050002@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <4FD9FCAF.4050002@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: George Dunlap Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org At 16:01 +0100 on 14 Jun (1339689663), George Dunlap wrote: > On 14/06/12 11:21, Tim Deegan wrote: > >At 12:54 +0100 on 08 Jun (1339160091), George Dunlap wrote: > >>Return the p2m level of the entry which filled this request. > >>Intended to be used to see if pages returned by the balloon > >>driver are part of a superpage, and reclaim them if so. > >This looks broadly correct, but it's a bit invasive. If there's any way > >to rework patch 2 not to need it that would be helpful. It looks like > >the main use is for detecting and removing superpage PoD entries; maybe > >that could be done with a sweep like you have in the non-PoD case? > You mean the non-balloon case? I forget why I thought that was a bad > idea, exactly. Let me think about that. > >One niggle: returning level=5 on error is non-obvious, and it doesn't > >look like your code in patch 2 uses that. > Were you thinking -1 or something like that? Actually, looking at it again, and at the way the value is used by its caller, maybe 5 is OK (though it looks like it will return 6 in the EPT code). So assuming this patch doesn't go away, I'd be OK with just a comment explaining it. Cheers, Tim.