From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
Marek Marczykowski <marmarek@mimuw.edu.pl>
Subject: Re: blkfront problem in pvops kernel when barriers enabled
Date: Thu, 8 Sep 2011 09:11:49 -0400 [thread overview]
Message-ID: <20110908131149.GA28944@dumpdata.com> (raw)
In-Reply-To: <4E6893910200007800055376@nat28.tlf.novell.com>
On Thu, Sep 08, 2011 at 09:06:09AM +0100, Jan Beulich wrote:
> >>> On 07.09.11 at 19:41, Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> wrote:
> >> >> <scratches head>
> >> >>
> >> >> I can only think of 2.6.38-3 XenOLinux doing it - and it is a bug
> >> >> to do it. It really ought to _not_ advertise 'feature-barrier' and
> >> >> instead advertise 'feature-flush-cache'.
> >> >
> >> > Indeed, I see that I added feature-flush-cache support to the frontend
> >> > back then, but neglected to do so for the backend. Partly perhaps
> >> > because I'm not much of a (block, network, ...) driver person...
> >> >
> >> > However, what I'm not understanding with dropping feature-barrier
> >> > support from the backend - how do you deal with old frontends
> >> > wanting to use barriers? I'm currently converting them into
> >
> > Just not supporting them. I know it is incredibly bad to do so - but
> > I have not had a chance to write the code to emulate the 'feature-barrier'
> > correctly.
> >
> >> > WRITE_FLUSH_FUA operations in the backend as a (hopefully) best
> >> > effort approach.
> >
> > I am not sure. I need to run blktrace|blkparse to make sure it does the
> > right think as compared to a WRITE_BARRIER. Lets ask Christopher Hellwig - he
> > knows a lot of this.
> >
> >>
> >> Also I notice you're using WRITE_ODIRECT - what's the background
> >> of that?
> >
> > Ah,
> > http://git.drbd.org/linux-2.6-drbd.git/?p=linux-2.6-drbd.git;a=commit;h=013c3
> > ca184851078b9c04744efd4d47e52c6ecf8
>
> Hmm, that seems more like a band-aid than a real solution. What if with
> another scheduler (or after some changes to CFQ) REQ_SYNC actually
> hurts (as - without any data - I would have expected)? Can't/shouldn't
> the use of REQ_SYNC be made at least dependent on the scheduler in
> use on the queue?
This is what the header fine says about async vs sync:
* All IO is handled async in Linux. This is fine for background
* writes, but for reads or writes that someone waits for completion
* on, we want to notify the block layer and IO scheduler so that they
* know about it. That allows them to make better scheduling
* decisions. So when the below references 'sync' and 'async', it
* is referencing this priority hint.
To make sure I was not shooting myself in the foot, I did the change and
also made sure the other schedules worked without any regressions in speeds.
But keep in mind that this 'WRITE_ODIRECT' behavior is also used
by AIO, and by any userspace application that stick O_DIRECT on the
open call. So if another another scheduler breaks this behavior we are
not the only one affected.
next prev parent reply other threads:[~2011-09-08 13:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-04 10:49 blkfront problem in pvops kernel when barriers enabled Marek Marczykowski
2011-09-06 16:32 ` Konrad Rzeszutek Wilk
2011-09-06 16:55 ` Konrad Rzeszutek Wilk
2011-09-06 17:47 ` Marek Marczykowski
2011-09-06 17:16 ` Marek Marczykowski
2011-09-07 1:47 ` Konrad Rzeszutek Wilk
2011-09-07 9:50 ` Jan Beulich
2011-09-07 10:19 ` Jan Beulich
2011-09-07 17:41 ` Konrad Rzeszutek Wilk
2011-09-08 8:06 ` Jan Beulich
2011-09-08 13:11 ` Konrad Rzeszutek Wilk [this message]
2011-09-07 17:34 ` Jeremy Fitzhardinge
2011-09-07 17:43 ` Konrad Rzeszutek Wilk
2011-09-07 18:58 ` Jeremy Fitzhardinge
2011-09-07 19:31 ` Konrad Rzeszutek Wilk
2011-12-01 19:08 ` Konrad Rzeszutek Wilk
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=20110908131149.GA28944@dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=JBeulich@suse.com \
--cc=marmarek@mimuw.edu.pl \
--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).