Re: [PATCH 25/25] bcache: fix bio_{start,end}_io_acct with proper device

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

 



On Sat, Jul 25, 2020 at 08:00:39PM +0800, Coly Li wrote:
> Commit 85750aeb748f ("bcache: use bio_{start,end}_io_acct") moves the
> io account code to the location after bio_set_dev(bio, dc->bdev) in
> cached_dev_make_request(). Then the account is performed incorrectly on
> backing device, indeed the I/O should be counted to bcache device like
> /dev/bcache0.
> 
> With the mistaken I/O account, iostat does not display I/O counts for
> bcache device and all the numbers go to backing device. In writeback
> mode, the hard drive may have 340K+ IOPS which is impossible and wrong
> for spinning disk.
> 
> This patch introduces bch_bio_start_io_acct() and bch_bio_end_io_acct(),
> which switches bio->bi_disk to bcache device before calling
> bio_start_io_acct() or bio_end_io_acct(). Now the I/Os are counted to
> bcache device, and bcache device, cache device and backing device have
> their correct I/O count information back.

Please switch to use disk_{start,end}_io_acct instead of hacking around
with bi_disk assignments.



[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