Thread (61 messages) 61 messages, 2 authors, 2021-01-15

Re: [PATCH v13 41/45] sg: track lowest inactive and await indexes

From: Hannes Reinecke <hare@suse.de>
Date: 2021-01-14 07:26:35

On 1/13/21 11:45 PM, Douglas Gilbert wrote:
Use two integers in the sg_fd structure to track recent and lowest
xarray indexes that have become inactive or await a foreground
receive. This is used to shorten the number of xarray iterations
required prior to a match when queue (IO) depths are large, say
128.

Replace the req_cnt atomic in struct sg_fd with the inactives
atomic. With large queues cycles were wasted checking the request
xarray for any inactives when there were none to be found.

Rename the sg_rq_state_chg_*() functions to sg_rq_chg_state_*()
since too many things start with "sg_rq_state". Also the new
function names emphasize the change part a little more.

Signed-off-by: Douglas Gilbert <dgilbert@interlog.com>
---
  drivers/scsi/sg.c | 304 ++++++++++++++++++++++++++--------------------
  1 file changed, 175 insertions(+), 129 deletions(-)
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                Kernel Storage Architect
hare@suse.de                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help