All of lore.kernel.org
 help / color / mirror / Atom feed
* HVM restart issue
@ 2009-03-12  8:15 Yang, Xiaowei
  2009-03-12  8:31 ` Keir Fraser
  0 siblings, 1 reply; 7+ messages in thread
From: Yang, Xiaowei @ 2009-03-12  8:15 UTC (permalink / raw)
  To: xen-devel

Recently I found HVM restart (destroy + start) is very slowly and the 
reason is the change to xen-hotplug-cleanup (see below).

When HVM is destroyed, backend vbd/vnif drivers will not be notified 
until /local/domain/hvm_id is removed in xenstore. udev event is then 
generated and xen-hotplug-cleanup is called. So the first xenstore-read 
will always fail and leave rest undone and xenstore unclean. Suggestion 
is to move it after backend/frontend removal.

Another interesting thing is that in function claim_lock, "release_lock 
$1; sigerr" is registered as ERR handler. However it seems its scope in 
effect is within the function. After claim_lock returns, the handler 
restores to the previous one ("sigerr") on my machine. So when the above 
error happens, the first script exits without calling release_lock. It 
keeps the following script waiting. Is this a correct BASH behavior?

Thanks,
xiaowei

diff -r 16fc70ce40a7 -r b3774712e654 tools/hotplug/Linux/xen-hotplug-cleanup
--- a/tools/hotplug/Linux/xen-hotplug-cleanup   Mon Mar 02 10:32:32 2009 
+0000
+++ b/tools/hotplug/Linux/xen-hotplug-cleanup   Mon Mar 02 10:34:37 2009 
+0000
@@ -11,6 +11,13 @@ dir=$(dirname "$0")
  # This is pretty horrible, but there's not really a nicer way of 
solving this.
  claim_lock "block"

+# split backend/DEVCLASS/VMID/DEVID on slashes
+path_array=( ${XENBUS_PATH//\// } )
+# get /vm/UUID path
+vm=$(xenstore-read "/local/domain/${path_array[2]}/vm")
+# construct /vm/UUID/device/DEVCLASS/DEVID
+vm_dev="$vm/device/${path_array[1]}/${path_array[3]}"
+
  # remove device frontend store entries
  xenstore-rm -t \
    $(xenstore-read "$XENBUS_PATH/frontend" 2>/dev/null) 2>/dev/null || true
@@ -19,4 +26,7 @@ xenstore-rm -t "$XENBUS_PATH"        2>/
  xenstore-rm -t "$XENBUS_PATH"        2>/dev/null || true
  xenstore-rm -t "error/$XENBUS_PATH"  2>/dev/null || true

+# remove device path from /vm/UUID
+xenstore-rm -t "$vm_dev" 2>/dev/null || true
+
  release_lock "block"

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: HVM restart issue
  2009-03-12  8:15 HVM restart issue Yang, Xiaowei
@ 2009-03-12  8:31 ` Keir Fraser
  2009-03-12 10:56   ` Boris Derzhavets
  0 siblings, 1 reply; 7+ messages in thread
From: Keir Fraser @ 2009-03-12  8:31 UTC (permalink / raw)
  To: Yang, Xiaowei, xen-devel

On 12/03/2009 08:15, "Yang, Xiaowei" <xiaowei.yang@intel.com> wrote:

> Recently I found HVM restart (destroy + start) is very slowly and the
> reason is the change to xen-hotplug-cleanup (see below).
> 
> When HVM is destroyed, backend vbd/vnif drivers will not be notified
> until /local/domain/hvm_id is removed in xenstore. udev event is then
> generated and xen-hotplug-cleanup is called. So the first xenstore-read
> will always fail and leave rest undone and xenstore unclean. Suggestion
> is to move it after backend/frontend removal.

I think 19250 has been causing problems for lots of people. I will revert it
until a better version is proposed.

 -- Keir

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: HVM restart issue
  2009-03-12  8:31 ` Keir Fraser
@ 2009-03-12 10:56   ` Boris Derzhavets
  2009-03-12 11:18     ` Keir Fraser
  0 siblings, 1 reply; 7+ messages in thread
From: Boris Derzhavets @ 2009-03-12 10:56 UTC (permalink / raw)
  To: Yang, Xiaowei, xen-devel, Keir Fraser


[-- Attachment #1.1: Type: text/plain, Size: 1215 bytes --]

How long it takes to push changes to http://xenbits.xensource.com/xen-unstable.hg

Boris

--- On Thu, 3/12/09, Keir Fraser <keir.fraser@eu.citrix.com> wrote:
From: Keir Fraser <keir.fraser@eu.citrix.com>
Subject: Re: [Xen-devel] HVM restart issue
To: "Yang, Xiaowei" <xiaowei.yang@intel.com>, "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Date: Thursday, March 12, 2009, 4:31 AM

On 12/03/2009 08:15, "Yang, Xiaowei" <xiaowei.yang@intel.com>
wrote:

> Recently I found HVM restart (destroy + start) is very slowly and the
> reason is the change to xen-hotplug-cleanup (see below).
> 
> When HVM is destroyed, backend vbd/vnif drivers will not be notified
> until /local/domain/hvm_id is removed in xenstore. udev event is then
> generated and xen-hotplug-cleanup is called. So the first xenstore-read
> will always fail and leave rest undone and xenstore unclean. Suggestion
> is to move it after backend/frontend removal.

I think 19250 has been causing problems for lots of people. I will revert it
until a better version is proposed.

 -- Keir



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



      

[-- Attachment #1.2: Type: text/html, Size: 1625 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: HVM restart issue
  2009-03-12 10:56   ` Boris Derzhavets
@ 2009-03-12 11:18     ` Keir Fraser
  2009-03-12 13:02       ` Boris Derzhavets
  0 siblings, 1 reply; 7+ messages in thread
From: Keir Fraser @ 2009-03-12 11:18 UTC (permalink / raw)
  To: bderzhavets, Yang, Xiaowei, xen-devel

That one is there already.

 -- Keir

On 12/03/2009 10:56, "Boris Derzhavets" <bderzhavets@yahoo.com> wrote:

> How long it takes to push changes to
> http://xenbits.xensource.com/xen-unstable.hg
> 
> Boris
> 
> --- On Thu, 3/12/09, Keir Fraser <keir.fraser@eu.citrix.com> wrote:
>> From: Keir Fraser <keir.fraser@eu.citrix.com>
>> Subject: Re: [Xen-devel] HVM restart issue
>> To: "Yang, Xiaowei" <xiaowei.yang@intel.com>, "xen-devel@lists.xensource.com"
>> <xen-devel@lists.xensource.com>
>> Date: Thursday, March 12, 2009, 4:31 AM
>> 
>> On 12/03/2009 08:15, "Yang, Xiaowei" <xiaowei.yang@intel.com>
>> wrote:
>> 
>>> Recently I found HVM restart (destroy + start) is very slowly and the
>>> reason is the change to xen-hotplug-cleanup (see below).
>>> 
>>> When HVM is destroyed, backend vbd/vnif drivers will not be
>>  notified
>>> until /local/domain/hvm_id is removed in xenstore. udev event is then
>>> generated and xen-hotplug-cleanup is called. So the first xenstore-read
>>> will always fail and leave rest undone and xenstore unclean. Suggestion
>>> is to move it after backend/frontend removal.
>> 
>> I think 19250 has been causing problems for lots of people. I will revert it
>> until a better version is proposed.
>> 
>>  -- Keir
>> 
>> 
>> 
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xensource.com
>> http://lists.xensource.com/xen-devel
> 
>  

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: HVM restart issue
  2009-03-12 11:18     ` Keir Fraser
@ 2009-03-12 13:02       ` Boris Derzhavets
  2009-03-12 15:03         ` Keir Fraser
  0 siblings, 1 reply; 7+ messages in thread
From: Boris Derzhavets @ 2009-03-12 13:02 UTC (permalink / raw)
  To: Yang, Xiaowei, xen-devel, Keir Fraser


[-- Attachment #1.1: Type: text/plain, Size: 2169 bytes --]

I've just made a fresh clone of "xen unstable" with 19317 changesets.
19314 resolves the issue with hotplug scripts.
Please advise, how to add the most recent ,went in, without recreating
folder xen-unstable.hg and complete new clone.

Boris.

--- On Thu, 3/12/09, Keir Fraser <keir.fraser@eu.citrix.com> wrote:
From: Keir Fraser <keir.fraser@eu.citrix.com>
Subject: Re: [Xen-devel] HVM restart issue
To: "bderzhavets@yahoo.com" <bderzhavets@yahoo.com>, "Yang, Xiaowei" <xiaowei.yang@intel.com>, "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Date: Thursday, March 12, 2009, 7:18 AM

That one is there already.

 -- Keir

On 12/03/2009 10:56, "Boris Derzhavets" <bderzhavets@yahoo.com>
wrote:

> How long it takes to push changes to
> http://xenbits.xensource.com/xen-unstable.hg
> 
> Boris
> 
> --- On Thu, 3/12/09, Keir Fraser <keir.fraser@eu.citrix.com> wrote:
>> From: Keir Fraser <keir.fraser@eu.citrix.com>
>> Subject: Re: [Xen-devel] HVM restart issue
>> To: "Yang, Xiaowei" <xiaowei.yang@intel.com>,
"xen-devel@lists.xensource.com"
>> <xen-devel@lists.xensource.com>
>> Date: Thursday, March 12, 2009, 4:31 AM
>> 
>> On 12/03/2009 08:15, "Yang, Xiaowei"
<xiaowei.yang@intel.com>
>> wrote:
>> 
>>> Recently I found HVM restart (destroy + start) is very slowly and
the
>>> reason is the change to xen-hotplug-cleanup (see below).
>>> 
>>> When HVM is destroyed, backend vbd/vnif drivers will not be
>>  notified
>>> until /local/domain/hvm_id is removed in xenstore. udev event is
then
>>> generated and xen-hotplug-cleanup is called. So the first
xenstore-read
>>> will always fail and leave rest undone and xenstore unclean.
Suggestion
>>> is to move it after backend/frontend removal.
>> 
>> I think 19250 has been causing problems for lots of people. I will
revert it
>> until a better version is proposed.
>> 
>>  -- Keir
>> 
>> 
>> 
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xensource.com
>> http://lists.xensource.com/xen-devel
> 
>  



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



      

[-- Attachment #1.2: Type: text/html, Size: 2940 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: HVM restart issue
  2009-03-12 13:02       ` Boris Derzhavets
@ 2009-03-12 15:03         ` Keir Fraser
  2009-03-12 15:10           ` Boris Derzhavets
  0 siblings, 1 reply; 7+ messages in thread
From: Keir Fraser @ 2009-03-12 15:03 UTC (permalink / raw)
  To: bderzhavets, Yang, Xiaowei, xen-devel

hg pull ­u

 K.

On 12/03/2009 13:02, "Boris Derzhavets" <bderzhavets@yahoo.com> wrote:

> I've just made a fresh clone of "xen unstable" with 19317 changesets.
> 19314 resolves the issue with hotplug scripts.
> Please advise, how to add the most recent ,went in, without recreating
> folder xen-unstable.hg and complete new clone.
> 
> Boris.
> 
> --- On Thu, 3/12/09, Keir Fraser <keir.fraser@eu.citrix.com> wrote:
>> From: Keir Fraser <keir.fraser@eu.citrix.com>
>> Subject: Re: [Xen-devel] HVM restart issue
>> To: "bderzhavets@yahoo.com" <bderzhavets@yahoo.com>, "Yang, Xiaowei"
>> <xiaowei.yang@intel.com>, "xen-devel@lists.xensource.com"
>> <xen-devel@lists.xensource.com>
>> Date: Thursday, March 12, 2009, 7:18 AM
>> 
>> That one is there already.
>> 
>>  -- Keir
>> 
>> On 12/03/2009 10:56, "Boris
>>  Derzhavets" <bderzhavets@yahoo.com>
>> wrote:
>> 
>>> How long it takes to push changes to
>>> http://xenbits.xensource.com/xen-unstable.hg
>>> 
>>> Boris
>>> 
>>> --- On Thu, 3/12/09, Keir Fraser <keir.fraser@eu.citrix.com> wrote:
>>>> From: Keir Fraser <keir.fraser@eu.citrix.com>
>>>> Subject: Re: [Xen-devel] HVM restart issue
>>>> To: "Yang, Xiaowei" <xiaowei.yang@intel.com>,
>> "xen-devel@lists.xensource.com"
>>>> <xen-devel@lists.xensource.com>
>>>> Date: Thursday, March 12, 2009, 4:31 AM
>>>> 
>>>> On 12/03/2009 08:15, "Yang, Xiaowei"
>> <xiaowei.yang@intel.com>
>>>> wrote:
>>>> 
>>>>> Recently I found HVM restart (destroy + start) is very slowly and
>> the
>>>>> reason is the change to xen-hotplug-cleanup (see below).
>>>>> 
>>>>> When HVM is destroyed, backend vbd/vnif drivers will not
>>  be
>>>>  notified
>>>>> until /local/domain/hvm_id is removed in xenstore. udev event is
>> then
>>>>> generated and xen-hotplug-cleanup is called. So the first
>> xenstore-read
>>>>> will always fail and leave rest undone and xenstore unclean.
>> Suggestion
>>>>> is to move it after backend/frontend removal.
>>>> 
>>>> I think 19250 has been causing problems for lots of people. I will
>> revert it
>>>> until a better version is proposed.
>>>> 
>>>>  -- Keir
>>>> 
>>>> 
>>>> 
>>>> _______________________________________________
>>>> Xen-devel mailing list
>>>> Xen-devel@lists.xensource.com
>>>> http://lists.xensource.com/xen-devel
>>> 
>>>  
>> 
>> 
>> 
>> _______________________________________________
>> Xen-devel mailing
>>  list
>> Xen-devel@lists.xensource.com
>> http://lists.xensource.com/xen-devel
> 
>  

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: HVM restart issue
  2009-03-12 15:03         ` Keir Fraser
@ 2009-03-12 15:10           ` Boris Derzhavets
  0 siblings, 0 replies; 7+ messages in thread
From: Boris Derzhavets @ 2009-03-12 15:10 UTC (permalink / raw)
  To: Yang, Xiaowei, xen-devel, Keir Fraser


[-- Attachment #1.1: Type: text/plain, Size: 3082 bytes --]

Thank you, Keir.

--- On Thu, 3/12/09, Keir Fraser <keir.fraser@eu.citrix.com> wrote:
From: Keir Fraser <keir.fraser@eu.citrix.com>
Subject: Re: [Xen-devel] HVM restart issue
To: "bderzhavets@yahoo.com" <bderzhavets@yahoo.com>, "Yang, Xiaowei" <xiaowei.yang@intel.com>, "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Date: Thursday, March 12, 2009, 11:03 AM

hg pull ­u

 K.

On 12/03/2009 13:02, "Boris Derzhavets" <bderzhavets@yahoo.com>
wrote:

> I've just made a fresh clone of "xen unstable" with 19317
changesets.
> 19314 resolves the issue with hotplug scripts.
> Please advise, how to add the most recent ,went in, without recreating
> folder xen-unstable.hg and complete new clone.
> 
> Boris.
> 
> --- On Thu, 3/12/09, Keir Fraser <keir.fraser@eu.citrix.com> wrote:
>> From: Keir Fraser <keir.fraser@eu.citrix.com>
>> Subject: Re: [Xen-devel] HVM restart issue
>> To: "bderzhavets@yahoo.com" <bderzhavets@yahoo.com>,
"Yang, Xiaowei"
>> <xiaowei.yang@intel.com>,
"xen-devel@lists.xensource.com"
>> <xen-devel@lists.xensource.com>
>> Date: Thursday, March 12, 2009, 7:18 AM
>> 
>> That one is there already.
>> 
>>  -- Keir
>> 
>> On 12/03/2009 10:56, "Boris
>>  Derzhavets" <bderzhavets@yahoo.com>
>> wrote:
>> 
>>> How long it takes to push changes to
>>> http://xenbits.xensource.com/xen-unstable.hg
>>> 
>>> Boris
>>> 
>>> --- On Thu, 3/12/09, Keir Fraser <keir.fraser@eu.citrix.com>
wrote:
>>>> From: Keir Fraser <keir.fraser@eu.citrix.com>
>>>> Subject: Re: [Xen-devel] HVM restart issue
>>>> To: "Yang, Xiaowei" <xiaowei.yang@intel.com>,
>> "xen-devel@lists.xensource.com"
>>>> <xen-devel@lists.xensource.com>
>>>> Date: Thursday, March 12, 2009, 4:31 AM
>>>> 
>>>> On 12/03/2009 08:15, "Yang, Xiaowei"
>> <xiaowei.yang@intel.com>
>>>> wrote:
>>>> 
>>>>> Recently I found HVM restart (destroy + start) is very
slowly and
>> the
>>>>> reason is the change to xen-hotplug-cleanup (see below).
>>>>> 
>>>>> When HVM is destroyed, backend vbd/vnif drivers will not
>>  be
>>>>  notified
>>>>> until /local/domain/hvm_id is removed in xenstore. udev
event is
>> then
>>>>> generated and xen-hotplug-cleanup is called. So the first
>> xenstore-read
>>>>> will always fail and leave rest undone and xenstore
unclean.
>> Suggestion
>>>>> is to move it after backend/frontend removal.
>>>> 
>>>> I think 19250 has been causing problems for lots of people. I
will
>> revert it
>>>> until a better version is proposed.
>>>> 
>>>>  -- Keir
>>>> 
>>>> 
>>>> 
>>>> _______________________________________________
>>>> Xen-devel mailing list
>>>> Xen-devel@lists.xensource.com
>>>> http://lists.xensource.com/xen-devel
>>> 
>>>  
>> 
>> 
>> 
>> _______________________________________________
>> Xen-devel mailing
>>  list
>> Xen-devel@lists.xensource.com
>> http://lists.xensource.com/xen-devel
> 
>  



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



      

[-- Attachment #1.2: Type: text/html, Size: 4333 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-03-12 15:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-12  8:15 HVM restart issue Yang, Xiaowei
2009-03-12  8:31 ` Keir Fraser
2009-03-12 10:56   ` Boris Derzhavets
2009-03-12 11:18     ` Keir Fraser
2009-03-12 13:02       ` Boris Derzhavets
2009-03-12 15:03         ` Keir Fraser
2009-03-12 15:10           ` Boris Derzhavets

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.