All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 0/4] fs: Substitute bit-spinlocks for PREEMPT_RT and debugging
@ 2019-07-30 11:24 Thomas Gleixner
  2019-07-30 11:24 ` [patch 1/4] locking/lockdep: Add Kconfig option for bit spinlocks Thomas Gleixner
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Thomas Gleixner @ 2019-07-30 11:24 UTC (permalink / raw)
  To: LKML
  Cc: Peter Zijlstra, Ingo Molnar, Sebastian Siewior,
	Anna-Maria Gleixner, Steven Rostedt, Julia Cartwright,
	Theodore Tso, Matthew Wilcox, Alexander Viro, linux-fsdevel,
	linux-ext4, Jan Kara

Bit spinlocks are problematic if PREEMPT_RT is enabled. 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.

Bit spinlocks are also not covered by lock debugging, e.g. lockdep. With
the spinlock substitution in place, they can be exposed via a new config
switch: CONFIG_DEBUG_BIT_SPINLOCKS.

This series handles only buffer head and jbd2, but does not touch the
hlist_bl bit-spinlock usage.

For most usage sites of hlist_bl the protected sections are either really
small and do not contain any RT incompatible code or can be trivially fixed
up. In those cases converting the list_bl locking to spinlocks looks like
overkill, but it still might make sense to provide it for debugging.

The only exception for this is the code in drivers/md/dm-snap.c which has
interesting nested locking in place (via kmemcache, cgroups, block ...)
which completely escapes lockdep.

I pondered making the hlist_bl locking conditional on a per source
file define, but that does not work due to include hell.

Thoughts?

Thanks,

	tglx



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-08-01  8:44 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-30 11:24 [patch 0/4] fs: Substitute bit-spinlocks for PREEMPT_RT and debugging Thomas Gleixner
2019-07-30 11:24 ` [patch 1/4] locking/lockdep: Add Kconfig option for bit spinlocks Thomas Gleixner
2019-07-30 11:24 ` [patch 2/4] fs/buffer: Move BH_Uptodate_Lock locking into wrapper functions Thomas Gleixner
2019-07-31 14:46   ` Jan Kara
2019-07-31 22:27     ` Thomas Gleixner
2019-07-30 11:24 ` [patch 3/4] fs/buffer: Substitute BH_Uptodate_Lock for RT and bit spinlock debugging Thomas Gleixner
2019-07-31 14:47   ` Jan Kara
2019-07-30 11:24 ` [patch 4/4] fs: jbd/jbd2: Substitute BH locks for RT and lock debugging Thomas Gleixner
2019-07-31 15:48   ` Jan Kara
2019-07-31 19:40     ` Thomas Gleixner
2019-08-01  8:44       ` Jan Kara

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.