* LLDD: scatterlists only?
@ 2005-08-14 23:24 Luben Tuikov
2005-08-14 23:51 ` James Bottomley
0 siblings, 1 reply; 8+ messages in thread
From: Luben Tuikov @ 2005-08-14 23:24 UTC (permalink / raw)
To: linux-scsi
Hi,
Did someone have a patch or was there a talk
that SCSI Core is moving towards sending _only_ scatterlists
down to LLDDs? (effectively BUG_ON(!cmd->use_sg))
Luben
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: LLDD: scatterlists only?
2005-08-14 23:24 LLDD: scatterlists only? Luben Tuikov
@ 2005-08-14 23:51 ` James Bottomley
2005-08-15 0:08 ` Luben Tuikov
2005-08-15 6:21 ` Douglas Gilbert
0 siblings, 2 replies; 8+ messages in thread
From: James Bottomley @ 2005-08-14 23:51 UTC (permalink / raw)
To: ltuikov; +Cc: SCSI Mailing List
On Sun, 2005-08-14 at 16:24 -0700, Luben Tuikov wrote:
> Did someone have a patch or was there a talk
> that SCSI Core is moving towards sending _only_ scatterlists
> down to LLDDs? (effectively BUG_ON(!cmd->use_sg))
Yes, you can already see the beginnings in the -mm tree.
Jens is maintaining a block tree with this in here:
http://www.kernel.org/git/?p=linux/kernel/git/axboe/linux-2.6-block.git;a=shortlog;h=rq-map
And I have a scsi-block-2.6 tree based off this here:
http://www.kernel.org/git/?p=linux/kernel/git/jejb/scsi-block-2.6.git;a=summary
The missing (and frankly really nasty) pieces are pulling all the sg
handling out of sg and st, but fortunately Mike Christie is working on
that.
James
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: LLDD: scatterlists only?
2005-08-14 23:51 ` James Bottomley
@ 2005-08-15 0:08 ` Luben Tuikov
2005-08-15 6:21 ` Douglas Gilbert
1 sibling, 0 replies; 8+ messages in thread
From: Luben Tuikov @ 2005-08-15 0:08 UTC (permalink / raw)
To: James Bottomley; +Cc: SCSI Mailing List
--- James Bottomley <James.Bottomley@SteelEye.com> wrote:
> On Sun, 2005-08-14 at 16:24 -0700, Luben Tuikov wrote:
> > Did someone have a patch or was there a talk
> > that SCSI Core is moving towards sending _only_ scatterlists
> > down to LLDDs? (effectively BUG_ON(!cmd->use_sg))
>
> Yes, you can already see the beginnings in the -mm tree.
>
> Jens is maintaining a block tree with this in here:
>
>
http://www.kernel.org/git/?p=linux/kernel/git/axboe/linux-2.6-block.git;a=shortlog;h=rq-map
>
> And I have a scsi-block-2.6 tree based off this here:
>
>
http://www.kernel.org/git/?p=linux/kernel/git/jejb/scsi-block-2.6.git;a=summary
>
> The missing (and frankly really nasty) pieces are pulling all the sg
> handling out of sg and st, but fortunately Mike Christie is working on
> that.
Ok, thanks James.
Luben
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: LLDD: scatterlists only?
2005-08-14 23:51 ` James Bottomley
2005-08-15 0:08 ` Luben Tuikov
@ 2005-08-15 6:21 ` Douglas Gilbert
2005-08-15 6:59 ` Mike Christie
2005-08-15 10:17 ` Christoph Hellwig
1 sibling, 2 replies; 8+ messages in thread
From: Douglas Gilbert @ 2005-08-15 6:21 UTC (permalink / raw)
To: James Bottomley; +Cc: michaelc, SCSI Mailing List
James Bottomley wrote:
> On Sun, 2005-08-14 at 16:24 -0700, Luben Tuikov wrote:
>
>>Did someone have a patch or was there a talk
>>that SCSI Core is moving towards sending _only_ scatterlists
>>down to LLDDs? (effectively BUG_ON(!cmd->use_sg))
>
>
> Yes, you can already see the beginnings in the -mm tree.
>
> Jens is maintaining a block tree with this in here:
>
> http://www.kernel.org/git/?p=linux/kernel/git/axboe/linux-2.6-block.git;a=shortlog;h=rq-map
>
> And I have a scsi-block-2.6 tree based off this here:
>
> http://www.kernel.org/git/?p=linux/kernel/git/jejb/scsi-block-2.6.git;a=summary
>
> The missing (and frankly really nasty) pieces are pulling all the sg
> handling out of sg and st, but fortunately Mike Christie is working on
> that.
James,
I haven't looked at what would be involved with the sg
driver but it is good to hear Mike C. is working on it.
Hopefully scsi_cmnd::buffer and bufflen get _less_ generic
names in the process.
Doug Gilbert
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: LLDD: scatterlists only?
2005-08-15 6:21 ` Douglas Gilbert
@ 2005-08-15 6:59 ` Mike Christie
2005-08-15 12:51 ` Douglas Gilbert
2005-08-15 10:17 ` Christoph Hellwig
1 sibling, 1 reply; 8+ messages in thread
From: Mike Christie @ 2005-08-15 6:59 UTC (permalink / raw)
To: dougg; +Cc: James Bottomley, SCSI Mailing List
Douglas Gilbert wrote:
> James Bottomley wrote:
>
>>On Sun, 2005-08-14 at 16:24 -0700, Luben Tuikov wrote:
>>
>>
>>>Did someone have a patch or was there a talk
>>>that SCSI Core is moving towards sending _only_ scatterlists
>>>down to LLDDs? (effectively BUG_ON(!cmd->use_sg))
>>
>>
>>Yes, you can already see the beginnings in the -mm tree.
>>
>>Jens is maintaining a block tree with this in here:
>>
>>http://www.kernel.org/git/?p=linux/kernel/git/axboe/linux-2.6-block.git;a=shortlog;h=rq-map
>>
>>And I have a scsi-block-2.6 tree based off this here:
>>
>>http://www.kernel.org/git/?p=linux/kernel/git/jejb/scsi-block-2.6.git;a=summary
>>
>>The missing (and frankly really nasty) pieces are pulling all the sg
>>handling out of sg and st, but fortunately Mike Christie is working on
>>that.
>
>
> James,
>
> I haven't looked at what would be involved with the sg
> driver but it is good to hear Mike C. is working on it.
>
I sent a patch to begin this the other day
http://marc.theaimsgroup.com/?l=linux-scsi&m=112356952007369&w=2
The patch is not complete. I have to add a bunch of stuff I ripped out
like the security checks and mmap code. I also have to move some code to
a scsi command like James did for the sync code. I am looking over st to
try and figure out what to share right now.
One question though. For SG_DXFER_TO_FROM_DEV it looks like for the
block layer SG_IO code only the write part of the command could get run.
This is becuase in sg_io() the reading variable is never used so a
copy_to_user (that is if we end up not being able to do direct IO) may
never happen. What commands use SG_DXFER_TO_FROM_DEV, and do we need the
read part (or did I misread the block layer code or have we just been
getting lucky and been doing zero copy).
Also for the new interface the write and read will be the same size
becuase we use dxfer_len, but for the old interface is the same true?
From looking at the sg driver it looks like there could be different
values for the read and write part, but is that ever used or is it just
extra tests. And again what commands do this, so I can test them?
Thanks
Mike
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: LLDD: scatterlists only?
2005-08-15 6:59 ` Mike Christie
@ 2005-08-15 12:51 ` Douglas Gilbert
0 siblings, 0 replies; 8+ messages in thread
From: Douglas Gilbert @ 2005-08-15 12:51 UTC (permalink / raw)
To: Mike Christie; +Cc: James Bottomley, SCSI Mailing List
Mike Christie wrote:
> Douglas Gilbert wrote:
>
>> James Bottomley wrote:
>>
>>> On Sun, 2005-08-14 at 16:24 -0700, Luben Tuikov wrote:
>>>
>>>
>>>> Did someone have a patch or was there a talk
>>>> that SCSI Core is moving towards sending _only_ scatterlists
>>>> down to LLDDs? (effectively BUG_ON(!cmd->use_sg))
>>>
>>>
>>>
>>> Yes, you can already see the beginnings in the -mm tree.
>>>
>>> Jens is maintaining a block tree with this in here:
>>>
>>> http://www.kernel.org/git/?p=linux/kernel/git/axboe/linux-2.6-block.git;a=shortlog;h=rq-map
>>>
>>>
>>> And I have a scsi-block-2.6 tree based off this here:
>>>
>>> http://www.kernel.org/git/?p=linux/kernel/git/jejb/scsi-block-2.6.git;a=summary
>>>
>>>
>>> The missing (and frankly really nasty) pieces are pulling all the sg
>>> handling out of sg and st, but fortunately Mike Christie is working on
>>> that.
>>
>>
>>
>> James,
>>
>> I haven't looked at what would be involved with the sg
>> driver but it is good to hear Mike C. is working on it.
>>
>
> I sent a patch to begin this the other day
> http://marc.theaimsgroup.com/?l=linux-scsi&m=112356952007369&w=2
>
> The patch is not complete. I have to add a bunch of stuff I ripped out
> like the security checks and mmap code. I also have to move some code to
> a scsi command like James did for the sync code. I am looking over st to
> try and figure out what to share right now.
>
> One question though. For SG_DXFER_TO_FROM_DEV it looks like for the
> block layer SG_IO code only the write part of the command could get run.
> This is becuase in sg_io() the reading variable is never used so a
> copy_to_user (that is if we end up not being able to do direct IO) may
> never happen. What commands use SG_DXFER_TO_FROM_DEV, and do we need the
> read part (or did I misread the block layer code or have we just been
> getting lucky and been doing zero copy).
Mike,
As I noted in an earlier post, in the absence of a reserve
buffer, SG_DXFER_TO_FROM_DEV should simply translate to
SG_DXFER_FROM_DEV (i.e. a read from device).
> Also for the new interface the write and read will be the same size
> becuase we use dxfer_len, but for the old interface is the same true?
Yes it was always assumed the contents of the sg_io_hdr structure
given to write() and the corresponding read() would be the same
apart from the sg_io_hdr::pack_id field when the
SG_SET_FORCE_PACK_ID was given to sg_io_hdr::flags. See
Documentation/scsi/scsi-generic.txt for details of that
special case.
For DIO/mmap-ed IO, the sg_io_hdr::dxfer_len value given to
the read() cannot be operative (e.g. the IO may have already
occurred by the time the read() is called).
> From looking at the sg driver it looks like there could be different
> values for the read and write part, but is that ever used or is it just
> extra tests. And again what commands do this, so I can test them?
If there are tests then it is just sanity/paranoia.
Doug Gilbert
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: LLDD: scatterlists only?
2005-08-15 6:21 ` Douglas Gilbert
2005-08-15 6:59 ` Mike Christie
@ 2005-08-15 10:17 ` Christoph Hellwig
1 sibling, 0 replies; 8+ messages in thread
From: Christoph Hellwig @ 2005-08-15 10:17 UTC (permalink / raw)
To: Douglas Gilbert; +Cc: James Bottomley, michaelc, SCSI Mailing List
On Mon, Aug 15, 2005 at 04:21:37PM +1000, Douglas Gilbert wrote:
> I haven't looked at what would be involved with the sg
> driver but it is good to hear Mike C. is working on it.
>
> Hopefully scsi_cmnd::buffer and bufflen get _less_ generic
> names in the process.
I'm not sure it's a that good idea as it would break old drivers
while now they just continue to work with a bit of dead code.
^ permalink raw reply [flat|nested] 8+ messages in thread
* LLDD: scatterlists only?
@ 2005-08-14 22:22 Luben Tuikov
0 siblings, 0 replies; 8+ messages in thread
From: Luben Tuikov @ 2005-08-14 22:22 UTC (permalink / raw)
To: SCSI Mailing List
Hi,
Did someone have a patch or was there a talk
that SCSI Core is moving towards sending _only_ scatterlists
down to LLDDs? (effectively BUG_ON(!cmd->use_sg))
Luben
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2005-08-15 12:51 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-14 23:24 LLDD: scatterlists only? Luben Tuikov
2005-08-14 23:51 ` James Bottomley
2005-08-15 0:08 ` Luben Tuikov
2005-08-15 6:21 ` Douglas Gilbert
2005-08-15 6:59 ` Mike Christie
2005-08-15 12:51 ` Douglas Gilbert
2005-08-15 10:17 ` Christoph Hellwig
-- strict thread matches above, loose matches on Subject: below --
2005-08-14 22:22 Luben Tuikov
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).