mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [patch 0/2] x86/fpu: Make fpu_lock() RT compliant
@ 2020-10-27 10:09 Thomas Gleixner
  2020-10-27 10:09 ` [patch 1/2] x86/fpu: Simplify fpregs_[un]lock() Thomas Gleixner
  2020-10-27 10:09 ` [patch 2/2] x86/fpu: Make kernel FPU protection RT friendly Thomas Gleixner
  0 siblings, 2 replies; 6+ messages in thread
From: Thomas Gleixner @ 2020-10-27 10:09 UTC (permalink / raw)
  To: LKML; +Cc: x86, Sebastian Andrzej Siewior

FPU serialization uses

    preempt_disable(); local_bh_disable();

which is silly because local_bh_disable() implicitly disables
preemption. So this can be reduced to local_bh_disable().

But this does not work on RT kernels because local_bh_disable() only
serializes bottom half related processing via a local lock, but does not
disable preemption.

On RT kernels preempt_disable() is the right choice because on RT bottom
half processing is always in thread context, so preempt_disable()
implicitly protects against bottom half processing there.

Thanks,

	tglx


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

end of thread, other threads:[~2020-11-11 13:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-27 10:09 [patch 0/2] x86/fpu: Make fpu_lock() RT compliant Thomas Gleixner
2020-10-27 10:09 ` [patch 1/2] x86/fpu: Simplify fpregs_[un]lock() Thomas Gleixner
2020-11-11 13:36   ` [tip: x86/fpu] " tip-bot2 for Thomas Gleixner
2020-10-27 10:09 ` [patch 2/2] x86/fpu: Make kernel FPU protection RT friendly Thomas Gleixner
2020-10-27 10:42   ` Sebastian Andrzej Siewior
2020-11-11 13:36   ` [tip: x86/fpu] " tip-bot2 for Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®