Messages in this thread | | | Date | Mon, 4 May 2020 07:00:44 -0700 | From | Christoph Hellwig <> | Subject | Re: [PATCH 1/4] block/part_stat: remove rcu_read_lock() from part_stat_lock() |
| |
On Mon, May 04, 2020 at 04:29:29PM +0300, Konstantin Khlebnikov wrote: > RCU lock is required only in blk_account_io_start() to lookup partition. > After that request holds reference to related hd_struct. > > Replace get_cpu() with preempt_disable() - returned cpu index is unused. > > Non-SMP case also needs preempt_disable, otherwise statistics update could > be non-atomic. Previously that was provided by rcu_read_lock(). > > Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Looks good,
Signed-off-by: Christoph Hellwig <hch@lst.de>
although I wonder if we should just kill off part_stat_lock and part_stat_unlock.
| |