Commit 5da98b82 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by Jonathan Corbet

pi-futex.txt: standardize document format

Each text file under Documentation follows a different
format. Some doesn't even have titles!

Change its representation to follow the adopted standard,
using ReST markups for it to be parseable by Sphinx.

This document requires just minor adjustments to match
the standard documentation style:

- promote document name;
- remove extra collons on some chapter titles;
- use "-" for a bulleted list.
Signed-off-by: 's avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: 's avatarJonathan Corbet <corbet@lwn.net>
parent 5426a2cc
======================
Lightweight PI-futexes Lightweight PI-futexes
---------------------- ======================
We are calling them lightweight for 3 reasons: We are calling them lightweight for 3 reasons:
...@@ -25,8 +26,8 @@ determinism and well-bound latencies. Even in the worst-case, PI will ...@@ -25,8 +26,8 @@ determinism and well-bound latencies. Even in the worst-case, PI will
improve the statistical distribution of locking related application improve the statistical distribution of locking related application
delays. delays.
The longer reply: The longer reply
----------------- ----------------
Firstly, sharing locks between multiple tasks is a common programming Firstly, sharing locks between multiple tasks is a common programming
technique that often cannot be replaced with lockless algorithms. As we technique that often cannot be replaced with lockless algorithms. As we
...@@ -71,8 +72,8 @@ deterministic execution of the high-prio task: any medium-priority task ...@@ -71,8 +72,8 @@ deterministic execution of the high-prio task: any medium-priority task
could preempt the low-prio task while it holds the shared lock and could preempt the low-prio task while it holds the shared lock and
executes the critical section, and could delay it indefinitely. executes the critical section, and could delay it indefinitely.
Implementation: Implementation
--------------- --------------
As mentioned before, the userspace fastpath of PI-enabled pthread As mentioned before, the userspace fastpath of PI-enabled pthread
mutexes involves no kernel work at all - they behave quite similarly to mutexes involves no kernel work at all - they behave quite similarly to
...@@ -83,8 +84,8 @@ entering the kernel. ...@@ -83,8 +84,8 @@ entering the kernel.
To handle the slowpath, we have added two new futex ops: To handle the slowpath, we have added two new futex ops:
FUTEX_LOCK_PI - FUTEX_LOCK_PI
FUTEX_UNLOCK_PI - FUTEX_UNLOCK_PI
If the lock-acquire fastpath fails, [i.e. an atomic transition from 0 to If the lock-acquire fastpath fails, [i.e. an atomic transition from 0 to
TID fails], then FUTEX_LOCK_PI is called. The kernel does all the TID fails], then FUTEX_LOCK_PI is called. The kernel does all the
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment