From: axboe@kernel.dk (Jens Axboe)
Subject: [PATCH v2 2/2] blk-mq: Add a polling specific stats function
Date: Fri, 7 Apr 2017 08:01:45 -0600 [thread overview]
Message-ID: <bb76465b-d708-f5df-e2ec-c99d052e9b27@kernel.dk> (raw)
In-Reply-To: <2AD7D1E1-3906-4ABA-A301-E15DABAF443C@raithlin.com>
On 04/07/2017 06:11 AM, Stephen Bates wrote:
> On 2017-04-05, 7:14 PM, "Jens Axboe" <axboe@kernel.dk> wrote:
>
>> Why not just have 8 buckets, and make it:
>>
>> bucket = ddir + ilog2(bytes) - 9;
>>
>> and cap it at MAX_BUCKET (8) and put all those above into the top
>> bucket.
>
> Thanks. However, that equation does not differentiate between
> direction and size. Instead we can use
>
> bucket = ddir + 2*(ilog2(bytes) - 9);
It would be cleaner to just embed the fact that we have 2 sets of
identical buckets, and return
bucket = ilog2(bytes) - 9;
and have poll_stat be indexed by:
->poll_stat[ddir][bucket];
instead.
--
Jens Axboe
prev parent reply other threads:[~2017-04-07 14:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-05 17:39 [PATCH v2 0/2] blk-stat: Add ability to not bucket IO; improve IO polling sbates
2017-04-05 17:39 ` [PATCH v2 1/2] blk-stat: convert blk-stat bucket callback to signed sbates
2017-04-05 17:39 ` [PATCH v2 2/2] blk-mq: Add a polling specific stats function sbates
2017-04-05 18:14 ` Jens Axboe
2017-04-07 12:11 ` Stephen Bates
2017-04-07 14:01 ` Jens Axboe [this message]
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=bb76465b-d708-f5df-e2ec-c99d052e9b27@kernel.dk \
--to=axboe@kernel.dk \
/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;
as well as URLs for NNTP newsgroup(s).