public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Stephen Bates <sbates@raithlin.com>, Omar Sandoval <osandov@osandov.com>
Cc: "linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
	"Damien.LeMoal@wdc.com" <Damien.LeMoal@wdc.com>,
	"sagi@grimberg.me" <sagi@grimberg.me>
Subject: Re: [PATCH v3 2/2] blk-mq: Add a polling specific stats function
Date: Thu, 20 Apr 2017 14:34:31 -0600	[thread overview]
Message-ID: <6617fde7-4866-4a2d-6cf5-dc8b2c678186@kernel.dk> (raw)
In-Reply-To: <0E9E52B3-977A-4159-83B3-758564FF67AD@raithlin.com>

On 04/20/2017 02:33 PM, Stephen  Bates wrote:
> 
>> Nah, let's just leave it as-is then, even though I don't think it's the
>> prettiest thing I've ever seen.
> 
> I did look at making the stats buckets in the request_queue struct
> based on dir and size. Something like:
> 
> -       struct blk_rq_stat      poll_stat[2];
> +       struct blk_rq_stat      poll_stat[2][BLK_MQ_POLL_STATS_BKTS/2];
> 
> This actually did clean up some in some places but because the
> callback still uses a linear array of buckets we do get this:
> 
> -       if (cb->stat[READ].nr_samples)
> -               q->poll_stat[READ] = cb->stat[READ];
> -       if (cb->stat[WRITE].nr_samples)
> -               q->poll_stat[WRITE] = cb->stat[WRITE];
> +       for (bucket = 0; bucket < BLK_MQ_POLL_STATS_BKTS; bucket++) {
> +               if (cb->stat[bucket].nr_samples)
> +                       q->poll_stat[bucket%2][bucket/2] = cb->stat[bucket];
> 
> I tend to agree with Omar that keeping the buckets in a linear array
> is overall cleaner and more generalized.

I agree, it's fine as-is. We should queue it up for 4.12.

> However right now I am stuck as I am seeing the kernel oops I reported
> before in testing of my latest patchset [1]. I will try and find some
> time to bisect that but it looks like it was introduced when the
> support for mq schedulers was added (on or around bd166ef18).

Just replied to that one, let me know if the suggestion works.

-- 
Jens Axboe

  reply	other threads:[~2017-04-20 20:34 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-07 12:24 [PATCH v3 0/2] blk-stat: Add ability to not bucket IO; improve IO polling sbates
2017-04-07 12:24 ` [PATCH v3 1/2] blk-stat: convert blk-stat bucket callback to signed sbates
2017-04-07 12:24 ` [PATCH v3 2/2] blk-mq: Add a polling specific stats function sbates
2017-04-20 20:07   ` Omar Sandoval
2017-04-20 20:16     ` Jens Axboe
2017-04-20 20:20       ` Omar Sandoval
2017-04-20 20:22         ` Jens Axboe
2017-04-20 20:33           ` Stephen  Bates
2017-04-20 20:34             ` Jens Axboe [this message]
2017-04-20 20:47               ` Stephen  Bates
2017-04-20 20:53                 ` Jens Axboe
2017-04-20 21:08                   ` Stephen  Bates
2017-04-20 21:14                     ` Jens Axboe
2017-04-20 21:41                       ` Stephen  Bates
2017-04-20 21:42                         ` Jens Axboe
2017-04-20 21:45                           ` Stephen  Bates
2017-04-20 22:05                           ` Stephen  Bates
2017-04-20 22:06                             ` 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=6617fde7-4866-4a2d-6cf5-dc8b2c678186@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=Damien.LeMoal@wdc.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=osandov@osandov.com \
    --cc=sagi@grimberg.me \
    --cc=sbates@raithlin.com \
    /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