Skip to contentSkip to conversation

Question about interface between scsi mid layer and lld

DISCUSSION Miller, Mike (OS Dev) 1 participant 1 message Nov 3, 2011 1 message 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]

#1 lore raw

Adding the linux-scsi list...

-- mikem

"If you don't read the newspaper, you are uninformed; if you do read the newspaper, you are misinformed." - Mark Twain

Quoted 44 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: Thursday, November 03, 2011 8:47 AM
To: [email protected]
Cc: Brace, Don; Miller, Mike (OS Dev); [email protected]
Subject: Question about interface between scsi mid layer and lld

Hi James,

I had a question about the interface between the scsi mid layer and LLDs, esp. how commands are submitted to the LLD. Suppose you have an HBA that might prefer to have a batch of commands submitted to it all at once rather than one by one.

With the block layer interface, the LLD has a function which the block layer calls to begin submitting requests, but then this function calls blk_peek_request() and blk_start_request to pull requests out of the block layer, and so it could pull as many as it could hold, or as many as the block layer had lying around for it to work on.

The scsi LLD interface, with the queuecommand function is different in that it gets called once for each SCSI command, and there's as far as I know no way for the LLD to kind of pull more commands out of the scsi mid layer.

First, am I correct in thinking that there's no way for the LLD to process more than one command per call to queuecommand? Or am I missing some interface that's already there?

Second, if I am correct, are there any plans to provide an interface to do something like that?

I'm thinking with the existing interface, if I want to batch commands in SCSI a driver, I have to introduce latency, as the LLD has no idea how many commands the mid layer has to submit, or when it will submit them -- and introducing latency is probably not a good idea and likely will eat all the benefits that might be gained by batching submissions to the HBA.

Thanks,

-- steve