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] [PATCH 12/17] xenpaging: handle HVMCOPY_gfn_paged_out in

To: Olaf Hering <olaf@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 12/17] xenpaging: handle HVMCOPY_gfn_paged_out in copy_from/to_user
From: Keir Fraser <keir@xxxxxxx>
Date: Wed, 15 Dec 2010 11:35:21 +0000
Cc:
Delivery-date: Wed, 15 Dec 2010 03:36:39 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:user-agent:date :subject:from:to:message-id:thread-topic:thread-index:in-reply-to :mime-version:content-type:content-transfer-encoding; bh=q+L/KcU9rxbgcgUPr63liy4GbbdsZCsDMxkolXuhoXQ=; b=a6Um34KA49AshOSAFA0JXnD/ew5DYB+a6PiEiq71qRrn867MY6Id5me8RLV1Znpwgl WJ/awbHx04Xz/F0hKEzLj3bh9Y98IMPFougZtqNyLQ1iRzfSKoIckOQoPyQB/w69Xcvw Vw3/775YEyQC3Yw7YRRtp1kgTK4UOifzKhMbk=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:user-agent:date:subject:from:to:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; b=llE5dsqPUkT9JscvpFs/eeXQCJJVLL0UJZrMURFBKo0IaFgVC0MLZXLwTj2lK5uuqO LWGgNUMyYiGCUVAesCLV5yHVqNXFuGJbJDLC0ZiAUV3zmzfgT5c2c7kz8McyYuLhc8g/ ZTV+dei6rbKOrkv/ecP4MpouztfNfgjYiTUH4=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20101206205912.343173055@xxxxxxxxx>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcucTCfWAAEv1CpmsE2PNtP64KxlTw==
Thread-topic: [Xen-devel] [PATCH 12/17] xenpaging: handle HVMCOPY_gfn_paged_out in copy_from/to_user
User-agent: Microsoft-Entourage/12.27.0.100910
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!

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!

 -- Keir



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

<Prev in Thread] Current Thread [Next in Thread>