[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 2 of 4 RFC] xen, pod: Check zero-check pages returned by the balloon driver


  • To: "Tim Deegan" <tim@xxxxxxx>
  • From: "Andres Lagar-Cavilla" <andres@xxxxxxxxxxxxxxxx>
  • Date: Thu, 14 Jun 2012 05:57:38 -0700
  • Cc: George Dunlap <george.dunlap@xxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 14 Jun 2012 12:57:57 +0000
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=lagarcavilla.org; h=message-id :in-reply-to:references:date:subject:from:to:cc:reply-to :mime-version:content-type:content-transfer-encoding; q=dns; s= lagarcavilla.org; b=sPIFXqZPStPdGYX2/napuBcTS1hVdDiT/obnQF6PLnB7 HCW3c/tft9f8PN04LLqOLc/GAob2aC2mwH1FQckdfgQMYy81E1frUOzsUd+nrY1x 1MUQ9MwseAlN5AljHqsa//gdmOSNVl5FtO9kkMr0zznZuAfwCa2Gsodp/2LGbQc=
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

> At 12:54 +0100 on 08 Jun (1339160092), George Dunlap wrote:
>> +        else if( p2m_is_ram(t) )
>> +        {
>> +            if ( steal_for_cache )
>> +            {
>> +                struct page_info *page;
>> +
>> +                ASSERT(mfn_valid(mfn));
>
> I think this assertion is broken by the paging code, which adds
> paged-out pages to the RAM types.  One fix is to undo that change and
> have p2m_is_ram() only be true for present pages, but I think for 4.2 it
> would be less disruptive to test here for the paged-out and paging
> types.
>
> Cc'ing Andres on the larger question -- do you think we can have
> p2m_is_ram() imply mfn_valid() again?  I'm not sure whether it will make
> things cleaner (or at least move the burden of handling paged-out memory
> into the paging code) or add more boilerplate to paths where the paging
> will be handled after a check for p2m_os_ram().  What do you think?
>

Imho, pages in any of the states of the paging state machine, are ram.
They are not mmio, grants or whatever. They just happen to be absent at
the moment.

This is not an immediately useful response because its corollary entails
that PoD pages are also ram.

There are a few possible ways around this. One problem is that
p2m_ram_paging_in may or may not have a backing mfn, so we can't just
check the p2mt, and that is frankly annoying (plenty of wth conditionals
in the p2m code relate to this). We could disambiguate with two states,
e.g.:
 p2m_ram_paging_in_absent
 p2m_ram_paging_present
 p2m_is_paging_in(p2mt) returns true for both -> use in most cases where
p2m_ram_paging_in is used right now
 p2m_is_ram_present(p2mt) returns true for p2m_ram_rw, log dirty, shared,
paging_out and paging_in present -> used in cases like above
 p2m_is_ram(p2mt) includes ram_present and pod and paging_in_absent ->
used in broader cases

That looks like a fairly dangerous changeset. But the more comprehensive
solution. The path of least resistance is obviously to just fix George's
current patches.

btw, George, couple of #if 0's and //'s on your "Check zero-check pages
returned by the balloon driver" patch. Those are going out before tree
inclusion, I assume?

Thanks
Andres


) Then most checks for p2m_ram_paging, s/
> Cheers,
>
> Tim.
>



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.