virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <jens.axboe@oracle.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: kvm-devel <kvm-devel@lists.sourceforge.net>,
	Tejun Heo <htejun@gmail.com>,
	xen-devel <xen-devel@lists.xensource.com>,
	virtualization <virtualization@lists.linux-foundation.org>
Subject: Re: More virtio users
Date: Tue, 12 Jun 2007 08:24:52 +0200	[thread overview]
Message-ID: <20070612062451.GN18832@kernel.dk> (raw)
In-Reply-To: <1181608287.16428.127.camel@localhost.localdomain>

On Tue, Jun 12 2007, Rusty Russell wrote:
> On Mon, 2007-06-11 at 09:33 +0200, Jens Axboe wrote:
> > On Mon, Jun 11 2007, Rusty Russell wrote:
> > > So the problem is that I'd like to handle all of them, but I'm not clear
> > > what requests my device can get.  I can't see a source of any other type
> > > of request.
> > 
> > The other main request type is blk_pc_request(). In the data setup it's
> > indentical to blk_fs_request(), there's a bio chain off ->bio. It's a
> > byte granularity entity though, so you should check ->data_len for the
> > size of it. ->cmd[] holds a SCSI cdb, which is the command you are
> > supposed to handle.
> 
> SCSI?  I'm even more lost now.
> 
> Q: So what *are* the commands?

They are SCSI commands!

> Q: Who puts them in my queue?

If you want to support SG_IO for instance, you'd have to deal with SCSI
commands.

> I have *never* seen anything but an fs request come through to my
> driver.

You probably only did basic IO to it.

> > Perhaps you are misunderstanding what the tag is? The tag is a unique
> > identifier for a pending request, so you will by definition never have
> > requests sharing a tag value.
> 
> Yes, I started to suspect that.
> 
> > But the tag is not to be considered as
> > ordered, unless it has the barrier flag set as well. So you only need to
> > serialize on the device side when blk_barrier_rq() is true.
> 
> blk_barrier_rq(req) is never true.  I put a BUG_ON(blk_barrier_rq(req))
> in my code and booted.  This is using the device as a root ext3
> filesystem.
>
> I reverted all the tag changes, still no barriers.  I added
> "blk_queue_ordered(vblk->disk->queue, QUEUE_ORDERED_DRAIN, NULL);",
> still no barriers.

-o barrier=1 for ext3, it doesn't use barriers by default. Or
barrier=flush for reiserfs. XFS defaults to barriers on.

-- 
Jens Axboe

  parent reply	other threads:[~2007-06-12  6:24 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <466BA965.6050208@qumranet.com>
2007-06-10  8:06 ` [Xen-devel] More virtio users Muli Ben-Yehuda
     [not found] ` <20070610080602.GD3738@rhun.haifa.ibm.com>
2007-06-10  8:09   ` Avi Kivity
     [not found]   ` <466BB1AF.1000601@qumranet.com>
2007-06-12 22:07     ` [kvm-devel] " Arnd Bergmann
2007-06-12 23:40       ` Caitlin Bestler
2007-06-10  8:13 ` Rusty Russell
     [not found] ` <1181463220.16428.24.camel@localhost.localdomain>
2007-06-10  8:16   ` Avi Kivity
     [not found]   ` <466BB34B.9050105@qumranet.com>
2007-06-10 12:37     ` Rusty Russell
     [not found]     ` <1181479060.16428.37.camel@localhost.localdomain>
2007-06-11  6:41       ` Jens Axboe
2007-06-11  7:29         ` Rusty Russell
     [not found]         ` <1181546953.16428.96.camel@localhost.localdomain>
2007-06-11  7:33           ` Jens Axboe
2007-06-12  0:31             ` Rusty Russell
     [not found]             ` <1181608287.16428.127.camel@localhost.localdomain>
2007-06-12  6:24               ` Jens Axboe [this message]
2007-06-12  7:52                 ` Rusty Russell
     [not found]                 ` <1181634747.6237.79.camel@localhost.localdomain>
2007-06-12  7:56                   ` Jens Axboe
2007-06-11  8:16   ` [Xen-devel] " Gerd Hoffmann
2007-06-11  8:19     ` Avi Kivity
2007-06-11 19:24     ` Anthony Liguori
2007-06-11 23:19     ` Rusty Russell
2007-06-12  3:36       ` Anthony Liguori
     [not found]       ` <466E14A6.6020400@codemonkey.ws>
2007-06-12  4:07         ` Benjamin Herrenschmidt
     [not found]     ` <1181603983.16428.100.camel@localhost.localdomain>
2007-06-12  0:47       ` Benjamin Herrenschmidt
2007-06-11  3:04 ` [Xen-devel] " ron minnich
2007-06-12 22:01 ` [kvm-devel] " Arnd Bergmann
2007-06-14 16:27   ` [Xen-devel] " Mark Williamson
2007-06-10  7:33 Avi Kivity

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=20070612062451.GN18832@kernel.dk \
    --to=jens.axboe@oracle.com \
    --cc=htejun@gmail.com \
    --cc=kvm-devel@lists.sourceforge.net \
    --cc=rusty@rustcorp.com.au \
    --cc=virtualization@lists.linux-foundation.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).