linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ticket spin locks vs. interrupt re-enabling during spin loops
@ 2012-01-13 16:30 Jan Beulich
  0 siblings, 0 replies; only message in thread
From: Jan Beulich @ 2012-01-13 16:30 UTC (permalink / raw)
  To: npiggin; +Cc: linux-kernel

Hi Nick,

prior to your introduction of ticket locks on x86 interrupts would get
re-enabled in what was then called __raw_spin_lock_flags(). While I
realize that this is tricky with ticket locks, have you ever thought
through what it would take to implement this correctly?

We had this working well in our Xen kernels up to 2.6.39, but the
changes to try_to_wake_up() in 3.0 uncovered a problem with the
original implementation, and so I'm now struggling with finding a
solution that can cover both this problem as well as to another
possible scenario I meanwhile thought of that would break with
the original code (an open coded spinning loop over spin_trylock()
continuing until success in a scenario similar to that in the new
try_to_wake_up()). A draft implementation that I had put
together today isn't working quite right yet (and hence I can't
quantify its performance impact at all).

One fundamental question of course is whether this really is worth
it at all, since re-enabling interrupts here inherently implies that
tickets may need to be dropped, and hence the fairness they are
intended to guarantee is being undermined. But keeping interrupts
frequently disabled for virtually indefinite periods of time (as can
happen in a CPU over-committed virtualized environment) is
certainly a problem that's worth considering solutions for.

Jan


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-01-13 16:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-13 16:30 ticket spin locks vs. interrupt re-enabling during spin loops Jan Beulich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).