public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <jens.axboe@oracle.com>
To: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: jeff@garzik.org, dougg@torque.net, linux-scsi@vger.kernel.org
Subject: Re: RFC: SCSI Generic version 4 interface
Date: Thu, 7 Dec 2006 09:57:56 +0100	[thread overview]
Message-ID: <20061207085756.GZ4392@kernel.dk> (raw)
In-Reply-To: <20061207175351Y.fujita.tomonori@lab.ntt.co.jp>

On Thu, Dec 07 2006, FUJITA Tomonori wrote:
> From: Jens Axboe <jens.axboe@oracle.com>
> Subject: Re: RFC: SCSI Generic version 4 interface
> Date: Thu, 7 Dec 2006 09:30:20 +0100
> 
> > On Thu, Dec 07 2006, FUJITA Tomonori wrote:
> > > From: Jens Axboe <jens.axboe@oracle.com>
> > > Subject: Re: RFC: SCSI Generic version 4 interface
> > > Date: Thu, 7 Dec 2006 09:06:59 +0100
> > > 
> > > > On Thu, Dec 07 2006, FUJITA Tomonori wrote:
> > > > > From: Jens Axboe <jens.axboe@oracle.com>
> > > > > Subject: Re: RFC: SCSI Generic version 4 interface
> > > > > Date: Tue, 7 Nov 2006 16:31:48 +0100
> > > > > 
> > > > > > On Tue, Nov 07 2006, Jeff Garzik wrote:
> > > > > > > Douglas Gilbert wrote:
> > > > > > > >I was asked to put together a proposal in May this
> > > > > > > >year for a new SCSI Generic interface structure. This
> > > > > > > >is the same structure that is used by the block layer
> > > > > > > >SG_IO ioctl. A few people have asked whether I had forgotten
> > > > > > > >that I agreed to write the proposal. So here it is. Those
> > > > > > > >who have seen it have made comments, some of which have
> > > > > > > >been incorporated.
> > > > > > > >
> > > > > > > >Some shortcomings of the sg version 3 interface are:
> > > > > > > >  - can't handle commands with bidirectional data (either
> > > > > > > >    can the SCSI subsystem at the moment)
> > > > > > > >  - if it was a bit more general it could carry other
> > > > > > > >    request/response protocols (e.g. Task Management
> > > > > > > >    Functions and SMP in Serial Attached SCSI)
> > > > > > > >  - no way of associating a task attribute or task tag
> > > > > > > >    with a SCSI command
> > > > > > > 
> > > > > > > Why avoid Jens Axboe's bsg?
> > > > > > > 
> > > > > > > It seems like that is already a good interface for carrying other 
> > > > > > > req/resp protocols.
> > > > > > 
> > > > > > I don't think Doug is avoiding that (if you are Doug, please do explain
> > > > > > :-), but rather outlining the next generation command format that bsg
> > > > > > should support for future use.
> > > > > 
> > > > > sg4 can be implemented on bsg nicely, I think. But why does the
> > > > > current bsg support sg3 partially? Do you plan to add the rest of sg3
> > > > > (which doesn't work nicely) to bsg?
> > > > 
> > > > What parts of sg v3 are missing? It's been a while since I implemented
> > > > that stuff, so I forget if I knowingly left out some features.
> > > 
> > > SG_FLAG_MMAP_IO, indirect IO, probably I miss something more.
> > 
> > bsg chooses the best way to handle the buffers on its own right now, in
> > my opinion sg has grown too many "features" that aren't very useful.
> 
> I agree. But if bsg replaces sg3 code, it supports the full features,
> doesn't it? If bsg does not replace sg3 code, we have more
> duplication.
> 
> I think it would be nice for bsg to support only sg4 (does not support
> some of the old sg3 interfaces) and not add sg4 support to sg.c and
> scsi_ioctl.c (of course they can share some code).

Yeah, I agree with that (if only to reduce my headache of actually
supporting the code!). When the sg v4 command interface is fully fleshed
out, I'm fine with moving bsg in that direction and dumping sg v3
support completely.

> Oh, bsg's sg3 doesn't work on 32-bit userspace and 64-bit kernel too
> if applicationos use the iovec interface, does it?

Probably not, haven't looked or checked :-)

> > mmap io may be useful, we could add that if anyone is actually using
> > it.
> 
> sg mmap io is tricky. sg_io_hdr doesn't have a mapped address,
> instead, the sg driver keeps a mapped address when an application
> calls mmap (that means sg cannot handle multiple mmap io requests
> simultaneously).

With sg v3 support out of the picture, that's not a worry. I'll probably
look into a different request/response architecture as well, the user
visible ring buffer is a strong approach in my opinion.

-- 
Jens Axboe


  reply	other threads:[~2006-12-07  8:57 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-06 21:47 RFC: SCSI Generic version 4 interface Douglas Gilbert
2006-11-07  7:48 ` Jeff Garzik
2006-11-07 15:31   ` Jens Axboe
2006-11-07 21:09     ` Douglas Gilbert
2006-12-07  8:02     ` FUJITA Tomonori
2006-12-07  8:06       ` Jens Axboe
2006-12-07  8:21         ` FUJITA Tomonori
2006-12-07  8:30           ` Jens Axboe
2006-12-07  8:53             ` FUJITA Tomonori
2006-12-07  8:57               ` Jens Axboe [this message]
2006-12-07 14:12                 ` FUJITA Tomonori
2006-12-07 14:24                   ` Jens Axboe
2006-11-08  0:47 ` FUJITA Tomonori
2006-11-21 22:06   ` Douglas Gilbert
2006-11-25 16:02     ` FUJITA Tomonori
2006-12-07  8:01       ` FUJITA Tomonori
2006-11-08 16:48 ` Jeremy Linton
2006-11-08 17:22   ` Matthew Wilcox
2006-11-09  0:52     ` FUJITA Tomonori
2006-11-09  0:44   ` FUJITA Tomonori

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=20061207085756.GZ4392@kernel.dk \
    --to=jens.axboe@oracle.com \
    --cc=dougg@torque.net \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=jeff@garzik.org \
    --cc=linux-scsi@vger.kernel.org \
    /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