From: Ian Jackson Subject: Re: Is: Contention in block script when doing guest saving. Was:Re: an issue with 'xm save' Date: Fri, 28 Sep 2012 15:14:21 +0100 Message-ID: <20581.45245.846208.289785@mariner.uk.xensource.com> References: <505C3647.1030003@oracle.com> <20120921143430.GA3522@phenom.dumpdata.com> <5062C16A.1020306@oracle.com> <20120926123534.GF7356@phenom.dumpdata.com> <5063EAFB.1070307@oracle.com> <20120927115918.GE8832@phenom.dumpdata.com> <50657D4B.9040303@oracle.com> <20120928140109.GA7483@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20120928140109.GA7483@localhost.localdomain> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Konrad Rzeszutek Wilk Cc: Konrad Rzeszutek Wilk , Dan Magenheimer , Feng Jin , Zhenzhong Duan , xen-devel List-Id: xen-devel@lists.xenproject.org Konrad Rzeszutek Wilk writes ("Is: Contention in block script when doing guest saving. Was:Re: [Xen-devel] an issue with 'xm save'"): > On Fri, Sep 28, 2012 at 06:34:51PM +0800, Zhenzhong Duan wrote: > > After replace locking.sh with OVM's, it worked. > > But xen-tools evolved to use flock based locking currently. We can't > > revert back. > > It seems changeset 25595:497e2fe49455 bring the issue. > > Finally, I came with a small patch that workaround the issue. > > Ian, any thoughts on how this can be fixed properly? The locking > is quite heavy and causes two scripts that do deal with blocks > to spin for a long time. The algorithm is not supposed to spin. If it spins there is a bug, I think. Can you show me a transcript of the spinning happening with "set -x" in force ? > > diff -r d364becfb083 tools/hotplug/Linux/locking.sh > > --- a/tools/hotplug/Linux/locking.sh Thu Sep 20 13:31:19 2012 +0200 > > +++ b/tools/hotplug/Linux/locking.sh Fri Sep 28 18:27:31 2012 +0800 > > @@ -66,6 +66,7 @@ > > release_lock() > > { > > _setlockfd $1 > > + flock -u $_lockfd > > rm "$_lockfile" I'm not sure I understand how this would help. Ian.