public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC 0/2] locking: Fix ww_mutex algorithm inconsistency.
@ 2018-05-25 12:38 Thomas Hellstrom
  2018-05-25 12:38 ` [PATCH RFC 1/2] locking: Implement an algorithm choice for Wound-Wait mutexes Thomas Hellstrom
  2018-05-25 12:38 ` [PATCH RFC 2/2] drm: Change deadlock-avoidance algorithm for the modeset locks Thomas Hellstrom
  0 siblings, 2 replies; 3+ messages in thread
From: Thomas Hellstrom @ 2018-05-25 12:38 UTC (permalink / raw)
  To: maarten.lankhosrt, dri-devel, linux-kernel

The algorithm used for linux Wound/Wait mutexes, is actually not Wound/Wait
but Wait/Die. See for example

http://www.mathcs.emory.edu/~cheung/Courses/554/Syllabus/8-recv+serial/deadlock-compare.html

Rather than renaming them across the tree to something like Wait/Die mutexes or
Deadlock Avoidance mutexes, this patch set implements also the Wound/Wait
algorithm It shouldn't touch the binary ordinary mutex paths when compiled
with otpimization.
We use Wound/Wait for the modeset locks which in theory may benefit slightly
from Wound/Wait rather than Wait/Die, but Wait/Die is actually superior for
larger number of simultaneous contending transactions so we keep the original
implementation as a choice, and don't touch the algorithm used by the
reservation objects.

Performance- and functional testing has been done using 

git://people.freedesktop.org/~thomash/ww_mutex_test

Using WW_BUILTIN and 4 and 16 competing threads.

Another option is of course to ignore the the naming / algorithm inconsistency.

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

end of thread, other threads:[~2018-05-25 12:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-25 12:38 [PATCH RFC 0/2] locking: Fix ww_mutex algorithm inconsistency Thomas Hellstrom
2018-05-25 12:38 ` [PATCH RFC 1/2] locking: Implement an algorithm choice for Wound-Wait mutexes Thomas Hellstrom
2018-05-25 12:38 ` [PATCH RFC 2/2] drm: Change deadlock-avoidance algorithm for the modeset locks Thomas Hellstrom

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