linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: "zhangwensheng (E)" <zhangwensheng5@huawei.com>
Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org
Subject: Re: [PATCH -next] block: update io_ticks when io hang
Date: Wed, 16 Feb 2022 20:08:56 -0700	[thread overview]
Message-ID: <5e633f42-817a-1861-524f-8659e7340351@kernel.dk> (raw)
In-Reply-To: <1998c61c-c3d9-8050-be43-16aba2d6e09f@huawei.com>

On 2/16/22 8:07 PM, zhangwensheng (E) wrote:
> hi, Jens:
> 
> I am sorry that there are some problems with the patch below:
> 
> 
> @@ -913,12 +913,14 @@ ssize_t part_stat_show(struct device *dev,
>       struct disk_stats stat;
>       unsigned int inflight;
>   -    part_stat_read_all(bdev, &stat);
>       if (queue_is_mq(q))
>           inflight = blk_mq_in_flight(q, bdev);
>       else
>           inflight = part_in_flight(bdev);
>   +    if (inflight)
> +        update_io_ticks(bdev, jiffies, true);
> +    part_stat_read_all(bdev, &stat);
>       return sprintf(buf,
>           "%8lu %8lu %8llu %8u "
>           "%8lu %8lu %8llu %8u "
> 
> It shoule use part_stat_lock() & part_stat_unlock() to protect update_io_ticks(),
> 
> because it operates on per-cpu variables.  And I will fix it in V2.

I'll drop it, please resend a fixed and tested one.

-- 
Jens Axboe


      parent reply	other threads:[~2022-02-17  3:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-25  9:19 [PATCH -next] block: update io_ticks when io hang Zhang Wensheng
     [not found] ` <45c2ae11-c44e-f27d-f029-66efe96b0804@huawei.com>
2022-02-08  2:12   ` zhangwensheng (E)
2022-02-10  3:04     ` zhangwensheng (E)
2022-02-17  2:48 ` Jens Axboe
     [not found]   ` <1998c61c-c3d9-8050-be43-16aba2d6e09f@huawei.com>
2022-02-17  3:08     ` 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=5e633f42-817a-1861-524f-8659e7340351@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zhangwensheng5@huawei.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;
as well as URLs for NNTP newsgroup(s).