]> git.baikalelectronics.ru Git - kernel.git/commit
fs/buffer: Make BH_Uptodate_Lock bit_spin_lock a regular spinlock_t
authorThomas Gleixner <tglx@linutronix.de>
Mon, 18 Nov 2019 13:28:24 +0000 (14:28 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Sat, 28 Mar 2020 12:21:08 +0000 (13:21 +0100)
commit28ff79075fefd4fe15debffd56cbd3bc1aca8cf5
tree6405dfe9656d09114a8aec1c87cffe170fc6dec9
parent4458cea4857dbe7d5bda45e74f389a090f549911
fs/buffer: Make BH_Uptodate_Lock bit_spin_lock a regular spinlock_t

Bit spinlocks are problematic if PREEMPT_RT is enabled, because they
disable preemption, which is undesired for latency reasons and breaks when
regular spinlocks are taken within the bit_spinlock locked region because
regular spinlocks are converted to 'sleeping spinlocks' on RT.

PREEMPT_RT replaced the bit spinlocks with regular spinlocks to avoid this
problem. The replacement was done conditionaly at compile time, but
Christoph requested to do an unconditional conversion.

Jan suggested to move the spinlock into a existing padding hole which
avoids a size increase of struct buffer_head on production kernels.

As a benefit the lock gains lockdep coverage.

[ bigeasy: Remove the wrapper and use always spinlock_t and move it into
           the padding hole ]

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Cc: Christoph Hellwig <hch@infradead.org>
Link: https://lkml.kernel.org/r/20191118132824.rclhrbujqh4b4g4d@linutronix.de
fs/buffer.c
fs/ext4/page-io.c
fs/ntfs/aops.c
include/linux/buffer_head.h