Re: [PATCH 1/3] block: introduce blk_queue_nr_active()

Ewan Milne
2023-09-27T13:55:14Z

I instrumented the code to look at nr_active and it did seem to be
updated for all the
nvme fabrics transports I tested, but I'll check. (As a blk_ ..
function it would have to
work on anything).

Of course the patches depend upon the block layer having the nr_active
count available
somewhere. I did it this way to avoid having to duplicate the count
in the nvme code.

-Ewan

On Wed, Sep 27, 2023 at 5:49 AM Ming Lei <ming.lei@redhat.com> wrote:
>
> On Mon, Sep 25, 2023 at 12:31:21PM -0400, Ewan D. Milne wrote:
> > Returns a count of the total number of active requests
> > in a queue. For non-shared tags (the usual case) this is
> > the sum of nr_active from all of the hctxs.
>
> hctx->nr_active is only updated if BLK_MQ_F_TAG_QUEUE_SHARED is true
> and blk_mq_is_shared_tags() is false, so hctx->nr_active isn't
> available if BLK_MQ_F_TAG_QUEUE_SHARED is false(the usual case?).
>
>
> Thanks,
> Ming
>