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

Re: [Xen-devel] [PATCH 12/17] xenpaging: handle HVMCOPY_gfn_paged_out in copy_from/to_user



On Wed, Dec 15, Keir Fraser wrote:

> On 06/12/2010 20:59, "Olaf Hering" <olaf@xxxxxxxxx> wrote:
> 
> >      mem_event_put_request(d, &req);
> > +
> > +    if ( req.flags & MEM_EVENT_FLAG_VCPU_PAUSED )
> > +    {
> > +        wait_event(d->wq, mfn_valid(gfn_to_mfn(p2m, gfn, &p2mt)) &&
> > !p2m_is_paging(p2mt));
> > +    }
> > +
> 
> This I find interesting. Do you not race the xenpaging daemon satisfying
> your page-in request, but then very quickly paging it out again? In which
> case you might never wake up!

That probably depends on the size of the mru size in the xenpaging
policy. Right now alot of page-out/page-in will happen before the gfn
will be nominated again.

> I think the condition you wait on should be for a response to your paging
> request. A wake_up() alone is not really sufficient; you need some kind of
> explicit flagging to the vcpu too. Could the paging daemon stick a response
> in a shared ring, or otherwise explicitly flag to this vcpu that it's
> request has been fully satisfied and it's time to wake up and retry its
> operation? Well, really that's a rhetorical question, because that is
> exactly what you need to implement for this waitqueue strategy to work
> properly!

Yes, there needs to be some reliable event which the vcpu has to pick up.
I will return to work on this issue, but most likely not this year anymore.


Olaf


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


 


Rackspace

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