Skip to contentSkip to conversation

Regarding posted scsi midlyaer patchsets

DISCUSSION Tejun Heo 3 participants 5 messages Apr 18, 2005 – Apr 19, 2005 2 messages not in the archive SCSI

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): 1113833744.4998.13.camel@mulgrave

Tejun Heo

author
#2 lore raw

Hello, James.
Hello, Jens.

Quoted 8 lines · James Bottomley
Quoted 4 lines · Tejun Heo

As it's been almost a week since I posted scsi midlayer patchsets and haven't heard anything yet, I've been wondering what's going on. Are they under review or all dropped? If they are dropped, can you please tell me why they are dropped?

Quoted 7 lines

I have about four of them in the scsi-misc-2.6 tree, if you look.

Your request path rewrite I already gave you feedback that I didn't want REQ_SOFTBARRIER in scsi ... it needs to be in the block submit API for special requests. Also, you have a patch for block in this code so I can't apply it without an ack from Jens. And all the rest of your patches depend on this one.

This thread started as an private inquiry to James regarding the status
of four patchsets I posted about a week ago. I'm replying publicly as I think we can use some discussion. The four patchsets are... (in the following order)

* timer updates
* REQ_SPECIAL/REQ_SOFTBARRIER usage change
* scsi_request_fn reimpl
* requeue path consolidation.

Accepted patches are

* scsi_cmnd->internal_timeout kill
* scsi_cmnd->serial_number_at_timeout
* remove volatile
* scsi_send_eh_cmnd() clean up

All four accepted patches are not included in any of above patchsets
and the timer update patchset doesn't depend on REQ_SPECIAL/REQ_SOFTBARRIER usage change patchset, so please review the timer update patchset.

And, James, regarding REQ_SOFTBARRIER, if the REQ_SOFTBARRIER thing can
be removed from SCSI midlayer, do you agree to change REQ_SPECIAL to mean special requests? If so, I have three proposals.

* move REQ_SOFTBARRIER setting to right after the allocation of
scsi_cmnd in scsi_prep_fn(). This will be the only place where REQ_SOFTBARRIER is used in SCSI midlayer, making it less pervasive.
* Or, make another API which sets REQ_SOFTBARRIER on requeue. maybe
blk_requeue_ordered_request()?
* Or, make blk_insert_request() not set REQ_SPECIAL on requeue. IMHO,
this is a bit too subtle.

I like #1 or #2. Jens, what do you think? Do you agree to remove
requeue feature from blk_insert_request()?

Thanks a lot. :-)

Signature · 1 line
tejun
#3 lore raw
Quoted 12 lines · Tejun Heo

And, James, regarding REQ_SOFTBARRIER, if the REQ_SOFTBARRIER thing can
be removed from SCSI midlayer, do you agree to change REQ_SPECIAL to mean special requests? If so, I have three proposals.

* move REQ_SOFTBARRIER setting to right after the allocation of
scsi_cmnd in scsi_prep_fn(). This will be the only place where REQ_SOFTBARRIER is used in SCSI midlayer, making it less pervasive.
* Or, make another API which sets REQ_SOFTBARRIER on requeue. maybe
blk_requeue_ordered_request()?
* Or, make blk_insert_request() not set REQ_SPECIAL on requeue. IMHO,
this is a bit too subtle.

Quoted 2 lines

I like #1 or #2. Jens, what do you think? Do you agree to remove
requeue feature from blk_insert_request()?

#2 is the best, imho. We really want to maintain ordering on requeue always, marking it softbarrier automatically in the block layer means the io schedulers don't have to do anything specific to handle it.

I have no problem with removing the requeue stuff from blk_insert_request(). That function is horribly weird as it is, it is supposed to look generic but is really just a scsi special case.

Signature · 1 line
Jens Axboe
#4 lore raw
Quoted 13 lines · Jens Axboe
Quoted 12 lines · Tejun Heo

And, James, regarding REQ_SOFTBARRIER, if the REQ_SOFTBARRIER thing can
be removed from SCSI midlayer, do you agree to change REQ_SPECIAL to mean special requests? If so, I have three proposals.

* move REQ_SOFTBARRIER setting to right after the allocation of
scsi_cmnd in scsi_prep_fn(). This will be the only place where REQ_SOFTBARRIER is used in SCSI midlayer, making it less pervasive.
* Or, make another API which sets REQ_SOFTBARRIER on requeue. maybe
blk_requeue_ordered_request()?
* Or, make blk_insert_request() not set REQ_SPECIAL on requeue. IMHO,
this is a bit too subtle.

Quoted 6 lines
Quoted 2 lines

I like #1 or #2. Jens, what do you think? Do you agree to remove
requeue feature from blk_insert_request()?

#2 is the best, imho. We really want to maintain ordering on requeue always, marking it softbarrier automatically in the block layer means the io schedulers don't have to do anything specific to handle it.

This is my preference too. In general, block is the only one that should care what the REQ_SOFTBARRIER flag actually means. SCSI only cares that it submits a non mergeable request.

I'm happy to separate the meaning of REQ_SPECIAL from req->special.

Quoted 3 lines

I have no problem with removing the requeue stuff from blk_insert_request(). That function is horribly weird as it is, it is supposed to look generic but is really just a scsi special case.

heh .. would this be because no other driver uses the block layer for requeuing ... ?

James

#5 lore raw
Quoted 21 lines · James Bottomley
Quoted 13 lines · Jens Axboe
Quoted 12 lines · Tejun Heo

And, James, regarding REQ_SOFTBARRIER, if the REQ_SOFTBARRIER thing can
be removed from SCSI midlayer, do you agree to change REQ_SPECIAL to mean special requests? If so, I have three proposals.

* move REQ_SOFTBARRIER setting to right after the allocation of
scsi_cmnd in scsi_prep_fn(). This will be the only place where REQ_SOFTBARRIER is used in SCSI midlayer, making it less pervasive.
* Or, make another API which sets REQ_SOFTBARRIER on requeue. maybe
blk_requeue_ordered_request()?
* Or, make blk_insert_request() not set REQ_SPECIAL on requeue. IMHO,
this is a bit too subtle.

Quoted 6 lines
Quoted 2 lines

I like #1 or #2. Jens, what do you think? Do you agree to remove
requeue feature from blk_insert_request()?

#2 is the best, imho. We really want to maintain ordering on requeue always, marking it softbarrier automatically in the block layer means the io schedulers don't have to do anything specific to handle it.

Quoted 5 lines

This is my preference too. In general, block is the only one that should care what the REQ_SOFTBARRIER flag actually means. SCSI only cares that it submits a non mergeable request.

I'm happy to separate the meaning of REQ_SPECIAL from req->special.

Isn't it just duplicate information anyways? I mean, just clear ->special if it isn't valid anymore. Having a seperate flag to indicate this seems a little suboptimal. It made more sense when ->cmd was a integer being READ, WRITE, etc. But as a seperate state now it doesn't.

Quoted 6 lines
Quoted 3 lines

I have no problem with removing the requeue stuff from blk_insert_request(). That function is horribly weird as it is, it is supposed to look generic but is really just a scsi special case.

heh .. would this be because no other driver uses the block layer for requeuing ... ?

Not so much that, more that it isn't very clean. It sets rq flags, assigns ->special, insert the request and then runs the queue. It does way too much. Either the caller wants a requeue, so he calls blk_requeue_request(). Or call blk_insert_request(), which should just do what the name indicates and not a whole bunch of other stuff. Then add a nicely named function for actually running the queue:

void blk_kick_queue_handling(request_queue_t *q)

{
        if (blk_queue_plugged(q))
                __generic_unplug_device(q);
        else
                q->request_fn(q);
}

(with a better name, I cannot come up with one just now :-)

Yep, this requires you do do the ->special assignment and the queue run in the caller, but I rather like that compared to a function that you have to look up in source everytime because you don't know exactly how much it does.

Signature · 1 line
Jens Axboe
#6 lore raw
Quoted 26 lines · Jens Axboe
Quoted 25 lines · James Bottomley
Quoted 13 lines · Jens Axboe
Quoted 12 lines · Tejun Heo

And, James, regarding REQ_SOFTBARRIER, if the REQ_SOFTBARRIER thing can
be removed from SCSI midlayer, do you agree to change REQ_SPECIAL to mean special requests? If so, I have three proposals.

* move REQ_SOFTBARRIER setting to right after the allocation of
scsi_cmnd in scsi_prep_fn(). This will be the only place where REQ_SOFTBARRIER is used in SCSI midlayer, making it less pervasive.
* Or, make another API which sets REQ_SOFTBARRIER on requeue. maybe
blk_requeue_ordered_request()?
* Or, make blk_insert_request() not set REQ_SPECIAL on requeue. IMHO,
this is a bit too subtle.

Quoted 6 lines
Quoted 2 lines

I like #1 or #2. Jens, what do you think? Do you agree to remove
requeue feature from blk_insert_request()?

#2 is the best, imho. We really want to maintain ordering on requeue always, marking it softbarrier automatically in the block layer means the io schedulers don't have to do anything specific to handle it.

This is my preference too. In general, block is the only one that should care what the REQ_SOFTBARRIER flag actually means. SCSI only cares that it submits a non mergeable request.

Quoted 6 lines
Quoted 1 line

I'm happy to separate the meaning of REQ_SPECIAL from req->special.

Isn't it just duplicate information anyways? I mean, just clear ->special if it isn't valid anymore. Having a seperate flag to indicate this seems a little suboptimal. It made more sense when ->cmd was a integer being READ, WRITE, etc. But as a seperate state now it doesn't.

Oh, and this is only true of SCSI, btw. REQ_SPECIAL should not be seen outside of driver code, its meaning is defined solely by the driver. SCSI ties it to ->special, but that is not necessarily true for any other driver.

Signature · 1 line
Jens Axboe