Re: [PATCH V4 08/12] blk-mq: return budget token from .get_budget callback

Hannes Reinecke
2020-11-16T10:22:52Z

On 11/16/20 10:07 AM, Ming Lei wrote:
> SCSI uses one global atomic variable to track queue depth for each
> LUN/request queue.
>
> This way doesn't scale well when there is lots of CPU cores and the
> disk is very fast. It has been observed that IOPS is affected a lot
> by tracking queue depth via sdev->device_busy in IO path.
>
> Return budget token from .get_budget callback, and the budget token
> can be passed to driver, so that we can replace the atomic variable
> with sbitmap_queue, then the scale issue can be fixed.
>
> Cc: Omar Sandoval <osandov@fb.com>
> Cc: Kashyap Desai <kashyap.desai@broadcom.com>
> Cc: Sumanesh Samanta <sumanesh.samanta@broadcom.com>
> Cc: Ewan D. Milne <emilne@redhat.com>
> Cc: Hannes Reinecke <hare@suse.de>
> Tested-by: Sumanesh Samanta <sumanesh.samanta@broadcom.com>
> Signed-off-by: Ming Lei <ming.lei@redhat.com>
> ---
> block/blk-mq-sched.c | 17 +++++++++++++----
> block/blk-mq.c | 36 +++++++++++++++++++++++++-----------
> block/blk-mq.h | 25 +++++++++++++++++++++----
> drivers/scsi/scsi_lib.c | 16 +++++++++++-----
> include/linux/blk-mq.h | 4 ++--
> 5 files changed, 72 insertions(+), 26 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