Re: [PATCH -next] block: update io_ticks when io hang

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux