From: "Jan Beulich" <JBeulich@novell.com>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>, James Song <JSong@novell.com>
Cc: Jim Fehlig <JFEHLIG@novell.com>, xen-devel@lists.xensource.com
Subject: Re: [PATCH 2/2] reap the blktapctl thread and notify the tapdisk backend driver to release resource like memory..
Date: Fri, 07 May 2010 08:20:26 +0100 [thread overview]
Message-ID: <4BE3DB5A0200007800001BB7@vpn.id2.novell.com> (raw)
In-Reply-To: <19426.59365.615882.575878@mariner.uk.xensource.com>
>>> Ian Jackson <Ian.Jackson@eu.citrix.com> 06.05.10 18:01 >>>
>James Song writes ("[Xen-devel] [PATCH 2/2] reap the blktapctl thread and notify the tapdisk backend driver to release resource like memory.."):
>> I write a new patch for this issue, which modified qemu code. So
>> Ian, could you take a look this patch,too.
>
>As far as I can see the effect here is to catch SIGINT in order to do
>some kind of cleanup. I don't think that is right. qemu could quite
>easily crash (and does!) so it is not right for cleanup to happen in
>qemu.
>
>If there is any cleanup that needs doing it needs to be done by qemu's
>caller.
>
>Reading the message you refer to, surely it should be the job of the
>toolstack (xend or libxl) to ensure that the backends are instructed
>to do all necessary releasing ?
No (or not only): The cleanup done here is to close open file handles
and/or mmap-s associated with blktap. You may have seen the kernel
side patches to allow the system as a whole to recover from that
state (particularly when qemu-dm crashes), but in general I consider
it bad practice for an application to keep open huge amounts of
mapped memory when getting orderly terminated.
"Orderly" in the qemu-dm case unfortunately means being terminated
by a signal, hence the signal should be intercepted by qemu
(otherwise, i.e. in the current state) the design seems broken to me.
Having said that doesn't mean that I agree to the blktap-centric
approach taken by the patch. Imo global cleanup should be
performed by qemu-dm upon being terminated - the question just is
whether such code already exists (and just needs to be hooked up),
or whether that part is missing altogether and needs to be written
from scratch.
Jan
next prev parent reply other threads:[~2010-05-07 7:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-05 3:22 [PATCH 2/2] reap the blktapctl thread and notify the tapdisk backend driver to release resource like memory James Song
2010-05-06 16:01 ` Ian Jackson
2010-05-07 7:20 ` Jan Beulich [this message]
2010-05-07 17:32 ` Ian Jackson
2010-05-10 7:06 ` Jan Beulich
2010-05-10 11:30 ` Ian Jackson
2010-05-10 12:10 ` Keir Fraser
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=4BE3DB5A0200007800001BB7@vpn.id2.novell.com \
--to=jbeulich@novell.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=JFEHLIG@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).