From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: Christoph Hellwig <hch@infradead.org>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
Jens Axboe <jaxboe@fusionio.com>,
Marsden <greg.marsden@oracle.com>, Joe Jin <joe.jin@oracle.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Greg@acsinet13.oracle.com,
Ian Campbell <Ian.Campbell@eu.citrix.com>,
Kurt C Hackel <KURT.HACKEL@oracle.com>
Subject: Re: Re: [patch] xen-blkback: sync I/O after backend disconnected
Date: Wed, 7 Sep 2011 08:48:00 -0400 [thread overview]
Message-ID: <20110907124800.GC32190@dumpdata.com> (raw)
In-Reply-To: <20054.29964.556177.999449@mariner.uk.xensource.com>
On Thu, Aug 25, 2011 at 05:15:08PM +0100, Ian Jackson wrote:
> Konrad Rzeszutek Wilk writes ("Re: [Xen-devel] Re: [patch] xen-blkback: sync I/O after backend disconnected"):
> > And the guest would normally issues a FLUSH when unmounting the
> > disk. Hm, I wonder what the conditions are when we forcibly kill the
> > guest - there might be outstanding I/Os in the disk's cache -
> > at which point we should probably sync the write cache, no?
>
> If we forcibly kill the guest we don't care about its IO in flight.
Why don't we care about it? It might have become wedged but that does
not mean we don't want to preserve as much as possible.
> After all we are throwing away everything that the guest has in its
> queue.
We end up finishing all of the outstanding I/Os that guest has sent.
When all of the bio_submit callbacks have finished then we release
the guest backend. So adding in a 'SYNC' to the queue would force
the disk cache to flush all the writes at least.
>
> Bear in mind that the reason for forcibly killing (or perhaps forcibly
> detaching) might be that the underlying device has wedged somehow. It
> would be annoying if that prevented even a force detach.
>
> Or to put it in other words: force detach and force kill should be
> lossy. Their whole point is to be the lossy version.
Hm, I think you still end up holding on the request queue and not
freeing the blkback thread and all of its goodies until the bio callbacks
have completed. When the device gets wedged they become wedged too.
You have to wait for the error handler to give up and then the avalanche
of 'write page lost' and 'error secxtor XX' along with the -ENXIO being
returned ends up in the bio callbacks.
What I am saying is that the force detach is still stuck waiting
if the device has wedged - irregardless of this patch.
>
> Ian.
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
prev parent reply other threads:[~2011-09-07 12:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-15 4:55 [patch] xen-blkback: sync I/O after backend disconnected Joe Jin
2011-08-15 14:46 ` Christoph Hellwig
2011-08-15 15:10 ` [Xen-devel] " Konrad Rzeszutek Wilk
2011-08-16 6:56 ` Joe Jin
2011-08-22 14:38 ` Christoph Hellwig
[not found] ` <m2n.s.1QsyrJ-132485@chiark.greenend.org.uk>
2011-08-25 16:15 ` [Xen-devel] " Ian Jackson
2011-09-07 12:48 ` Konrad Rzeszutek Wilk [this message]
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=20110907124800.GC32190@dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=Greg@acsinet13.oracle.com \
--cc=Ian.Campbell@eu.citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=KURT.HACKEL@oracle.com \
--cc=greg.marsden@oracle.com \
--cc=hch@infradead.org \
--cc=jaxboe@fusionio.com \
--cc=joe.jin@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--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).