From: Jim Fehlig <jfehlig@novell.com>
To: Jan Beulich <JBeulich@novell.com>
Cc: xen-devel@lists.xensource.com, James Song <JSong@novell.com>
Subject: Re: earlier remove the backend of tapdisk device in xenstore to release the resource allocated in backend driver lies in dom0'kernel
Date: Thu, 22 Apr 2010 11:14:09 -0600 [thread overview]
Message-ID: <4BD083E1.10509@novell.com> (raw)
In-Reply-To: <4BD04B87020000780003B5F4@vpn.id2.novell.com>
Jan Beulich wrote:
>>>> "James (song wei)" <jsong@novell.com> 22.04.10 10:08 >>>
>>>>
>> --- a/tools/python/xen/xend/XendDomainInfo.py Mon Apr 19 17:57:28 2010 +0100
>> +++ b/tools/python/xen/xend/XendDomainInfo.py Thu Apr 22 15:54:01 2010 +0800
>> @@ -2406,8 +2406,13 @@
>>
>> def _releaseDevices(self, suspend = False):
>> """Release all domain's devices. Nothrow guarantee."""
>> + t = xstransact("%s/device" % self.vmpath)
>> if self.image:
>> try:
>> + for dev in t.list('tap'):
>> + log.debug("Early removing %s", dev);
>> + self.getDeviceController('tap').destroyDevice(dev, True)
>> + time.sleep(0.1)
>> log.debug("Destroying device model")
>> self.image.destroyDeviceModel()
>> except Exception, e:
>> @@ -2416,9 +2421,10 @@
>> log.debug("No device model")
>>
>> log.debug("Releasing devices")
>> - t = xstransact("%s/device" % self.vmpath)
>> try:
>> for devclass in XendDevices.valid_devices():
>> + if devclass is 'tap':
>> + continue
>> for dev in t.list(devclass):
>> try:
>> log.debug("Removing %s", dev);
>>
>
> This seems more like a hack than a solution: Surely qemu-dm gets
> sent some sort of signal to shut down and clean up. The question
> thus really is why that cleanup doesn't include cleaning up blktap
> related resources. That is, I would expect the fix to be in qemu-dm,
> or at most in the xend code that reaps qemu-dm.
>
Agreed. qemu-dm should clean up these resources on shutdown. AFAICT,
it currently relies on receiving CTRMSG_CLOSE from blktapctrl (see
ioemu-dir/hw/xen_blktap.c), which it may never receive before exiting.
Regards,
Jim
next prev parent reply other threads:[~2010-04-22 17:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-22 8:08 earlier remove the backend of tapdisk device in xenstore to release the resource allocated in backend driver lies in dom0'kernel James (song wei)
2010-04-22 11:13 ` Jan Beulich
2010-04-22 17:14 ` Jim Fehlig [this message]
2010-04-23 1:48 ` James (song wei)
2010-04-23 3:24 ` James (song wei)
2010-04-23 8:13 ` Jan Beulich
2010-04-23 8:54 ` Keir Fraser
2010-04-23 9:09 ` James Song
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BD083E1.10509@novell.com \
--to=jfehlig@novell.com \
--cc=JBeulich@novell.com \
--cc=JSong@novell.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.