From: Omar Sandoval <osandov@osandov.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, brking@linux.vnet.ibm.com,
bart.vanassche@wdc.com
Subject: Re: [PATCH 5/6] blk-mq: enable checking two part inflight counts at the same time
Date: Wed, 9 Aug 2017 00:14:31 -0700 [thread overview]
Message-ID: <20170809071431.GB16843@vader> (raw)
In-Reply-To: <78566b09-d53c-811e-4bd5-c15cdea2e50a@kernel.dk>
On Tue, Aug 08, 2017 at 05:47:15PM -0600, Jens Axboe wrote:
> On 08/08/2017 04:48 PM, Omar Sandoval wrote:
> > On Fri, Aug 04, 2017 at 09:04:21AM -0600, Jens Axboe wrote:
> >> Modify blk_mq_in_flight() to count both a partition and root at
> >> the same time. Then we only have to call it once, instead of
> >> potentially looping the tags twice.
> >
> > Reviewed-by: Omar Sandoval <osandov@fb.com>
> >
> > One comment below.
> >
> >> Signed-off-by: Jens Axboe <axboe@kernel.dk>
> >
> > [snip]
> >
> >> diff --git a/block/blk-mq.c b/block/blk-mq.c
> >> index fe1aa1f5f069..410ed246bc9b 100644
> >> --- a/block/blk-mq.c
> >> +++ b/block/blk-mq.c
> >> @@ -98,11 +98,13 @@ static void blk_mq_check_inflight(struct blk_mq_hw_ctx *hctx,
> >> return;
> >>
> >> /*
> >> - * Count as inflight if it either matches the partition we asked
> >> - * for, or if it's the root
> >> + * Count as inflight if it matches the partition, count separately
> >> + * (but all) if we got asked for the root
> >> */
> >> - if (rq->part == mi->part || mi->part->partno)
> >> + if (rq->part == mi->part)
> >> mi->inflight[0]++;
> >
> > Similar concern as with patch 3, why special case the part0 case below?
>
> Not sure I follow, both are initialized for this case. Or do you mean
> the increment?
Yeah I mean the increment. If I'm reading this right, for the !part0
case, inflight[0] is the count of in-flight requests for the partition
and inflight[1] is the count of in-flight requests for the whole device.
For the part0 case, inflight[0] is the count of in-flight requests for
the root device and inflight[1] is always 0. Can we make inflight[1] the
same in the part0 and !part0 cases?
> The comment isn't great, I should update that. Basically
> we want to increment [1] if this is a partition, and increment [0] if it
> matches the one that was asked for.
>
> --
> Jens Axboe
>
next prev parent reply other threads:[~2017-08-09 7:14 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-04 15:04 [PATCHSET v2 0/6] block: more scalable inflight tracking Jens Axboe
2017-08-04 15:04 ` [PATCH 1/6] blk-mq-tag: check for NULL rq when iterating tags Jens Axboe
2017-08-04 19:34 ` Bart Van Assche
2017-08-04 19:35 ` Jens Axboe
2017-08-08 22:28 ` Omar Sandoval
2017-08-04 15:04 ` [PATCH 2/6] block: pass in queue to inflight accounting Jens Axboe
2017-08-08 22:30 ` Omar Sandoval
2017-08-04 15:04 ` [PATCH 3/6] block: make part_in_flight() take an array of two ints Jens Axboe
2017-08-04 19:38 ` Bart Van Assche
2017-08-04 19:40 ` Jens Axboe
2017-08-08 22:42 ` Omar Sandoval
2017-08-08 23:45 ` Jens Axboe
2017-08-04 15:04 ` [PATCH 4/6] blk-mq: provide internal in-flight variant Jens Axboe
2017-08-04 19:43 ` Bart Van Assche
2017-08-04 19:45 ` Jens Axboe
2017-08-08 22:46 ` Omar Sandoval
2017-08-04 15:04 ` [PATCH 5/6] blk-mq: enable checking two part inflight counts at the same time Jens Axboe
2017-08-04 19:44 ` Bart Van Assche
2017-08-04 19:56 ` Jens Axboe
2017-08-06 0:17 ` Bart Van Assche
2017-08-08 22:48 ` Omar Sandoval
2017-08-08 23:47 ` Jens Axboe
2017-08-09 7:14 ` Omar Sandoval [this message]
2017-08-09 14:13 ` Jens Axboe
2017-08-04 15:04 ` [PATCH 6/6] sbitmap: make sb_for_each_fn() return void Jens Axboe
2017-08-04 19:49 ` Bart Van Assche
2017-08-04 19:50 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170809071431.GB16843@vader \
--to=osandov@osandov.com \
--cc=axboe@kernel.dk \
--cc=bart.vanassche@wdc.com \
--cc=brking@linux.vnet.ibm.com \
--cc=linux-block@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox