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]improve suspend_evtchn lock processing

To: "Chun Yan Liu" <cyliu@xxxxxxxxxx>
Subject: Re: [Xen-devel][PATCH]improve suspend_evtchn lock processing
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Tue, 14 Dec 2010 18:46:08 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 14 Dec 2010 10:46:47 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4CEFC793020000660001A739@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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>
Newsgroups: chiark.mail.xen.devel
References: <4CEFC793020000660001A739@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Chun Yan Liu writes ("Re: [Xen-devel][PATCH]improve suspend_evtchn lock 
processing"):
> Yes. Using fctrl or flock instead can avoid the problem, better than an 
> O_EXCL lock file.
> I made a patch to use flock instead, please have a review:

Thanks for this patch and sorry for the delay replying.  I have just a
few comments:

> diff -r 3c4c3d48a835 tools/libxc/xc_suspend.c
> --- a/tools/libxc/xc_suspend.c    Thu Aug 26 11:16:56 2010 +0100
> +++ b/tools/libxc/xc_suspend.c    Fri Nov 26 19:41:23 2010 +0800
> @@ -16,19 +16,19 @@
...
> +#include 

That looks like a mistake.

> @@ -127,8 +115,7 @@
>      return suspend_evtchn;
>  
>  cleanup:
> -    if (suspend_evtchn != -1)
> -        xc_suspend_evtchn_release(xch, xce, domid, suspend_evtchn);
> +    xc_suspend_evtchn_release(xch, xce, domid, suspend_evtchn);
>  
>      return -1;
>  }

What is this change for ?

Ian.

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

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