Re: [PATCH v3] blk-cgroup: Replace u64 sync with spinlock for iostat update

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

 




On 7/17/24 14:24, tj@xxxxxxxxxx wrote:
Hello,

On Wed, Jul 17, 2024 at 02:18:39PM -0400, Waiman Long wrote:
Well, it can be confusing whether we are dealing with blkg->iostat or
blkg->iostat_cpu. In many cases, we are dealing with iostat_cpu instead of
iostat like __blkcg_rstat_flush() and blkg_clear_stat(). So we can't
eliminate the use of u64_stats_update_begin_irqsave() in those cases.
I mean, we need to distinguish them. For 32bits, blkg->iostat has multiple
updaters, so we can't use u64_sync; however, blkg->iostat_cpu has only one
updater (except blkg_clear_stat() which I don't think we need to worry too
much about), so u64_sync is fine.

I was wrong about __blkcg_rstat_flush(). Right, the main updater of iostat_cpu is  blk_cgroup_bio_start(). We do need to drop down some comment on what is protected by u64_sync and what is by blkg_stat_lock though. It can be confusing.

Cheers,
Longman





[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