Re: [PATCH] fixes and cleanups for the new command allocation code

James Bottomley
2003-02-05T01:54:04Z

On Tue, 2003-02-04 at 19:25, Patrick Mansfield wrote:
> But if we have a lot of prepped commands around we will be allocating
> memory that is not (currently) needed, we could end up using an equal
> number of scsi_cmnd's as we have blk requests. I would rather we not
> allocate or hold onto scsi_cmnd in such cases. (And generally in all
> cases, but that goes beyond.)

But that's not how the block queue works: prep is actually called from
elv_next_request(). Therefore, if you plug the queue in the request
function when you're over the queue limit, you only get a single fully
prepped request waiting in the queue, which, I think, is the desired
behaviour. Even if the queue is restarted because of I/O pressure, it
will begin with the prepped request and re-block.

> We are still missing single_lun checking.

And the slave_{alloc,configure,destroy} needs fixing too.

> I would like to see the patch in a tree before 2.5.60 (probably already
> too late), and then we can take care of these other issues. I think some
> systems/disks will barf if they are flooded with QUEUE FULLs.

OK, I concur, we can't do without throttling. I'll put it in and we can
try to fix up around it.

James