<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/linux/rtmutex.h, branch v6.19.11</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-09-29T07:42:35+00:00</updated>
<entry>
<title>locking/local_lock: Introduce local_lock_is_locked().</title>
<updated>2025-09-29T07:42:35+00:00</updated>
<author>
<name>Alexei Starovoitov</name>
<email>ast@kernel.org</email>
</author>
<published>2025-09-09T01:00:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4957089a23f41f31f8e7e22802a8ef9f5789c191'/>
<id>urn:sha1:4957089a23f41f31f8e7e22802a8ef9f5789c191</id>
<content type='text'>
Introduce local_lock_is_locked() that returns true when
given local_lock is locked by current cpu (in !PREEMPT_RT) or
by current task (in PREEMPT_RT).
The goal is to detect a deadlock by the caller.

Reviewed-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Signed-off-by: Vlastimil Babka &lt;vbabka@suse.cz&gt;
</content>
</entry>
<entry>
<title>locking/rtmutex: Move max_lock_depth into rtmutex.c</title>
<updated>2025-07-23T09:52:47+00:00</updated>
<author>
<name>Joel Granados</name>
<email>joel.granados@kernel.org</email>
</author>
<published>2025-04-29T13:12:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f1b4f23a52c272f6c1e205e8ec243f563323c5aa'/>
<id>urn:sha1:f1b4f23a52c272f6c1e205e8ec243f563323c5aa</id>
<content type='text'>
Move the max_lock_depth sysctl table element into rtmutex_api.c. Removed
the rtmutex.h include from sysctl.c. Chose to move into rtmutex_api.c
to avoid multiple registrations every time rtmutex.c is included in other
files.

This is part of a greater effort to move ctl tables into their
respective subsystems which will reduce the merge conflicts in
kernel/sysctl.c.

Signed-off-by: Joel Granados &lt;joel.granados@kernel.org&gt;
</content>
</entry>
<entry>
<title>locking/rtmutex: Add rt_mutex_lock_nest_lock() and rt_mutex_lock_killable().</title>
<updated>2021-12-04T09:56:23+00:00</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2021-11-29T17:46:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a3642021923b26d86bb27d88c826494827612c06'/>
<id>urn:sha1:a3642021923b26d86bb27d88c826494827612c06</id>
<content type='text'>
The locking selftest for ww-mutex expects to operate directly on the
base-mutex which becomes a rtmutex on PREEMPT_RT.

Add a rtmutex based implementation of mutex_lock_nest_lock() and
mutex_lock_killable() named rt_mutex_lock_nest_lock() abd
rt_mutex_lock_killable().

Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Link: https://lore.kernel.org/r/20211129174654.668506-5-bigeasy@linutronix.de
</content>
</entry>
<entry>
<title>locking/rtmutex: Reduce &lt;linux/rtmutex.h&gt; header dependencies, only include &lt;linux/rbtree_types.h&gt;</title>
<updated>2021-08-17T15:37:26+00:00</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2021-08-15T21:28:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e4e17af3b7f8841279b5a429de14907e26845c39'/>
<id>urn:sha1:e4e17af3b7f8841279b5a429de14907e26845c39</id>
<content type='text'>
We have the following header dependency problem on RT:

 - &lt;linux/rtmutex.h&gt; needs the definition of 'struct rb_root_cached'.
 - &lt;linux/rbtree.h&gt; includes &lt;linux/kernel.h&gt;, which includes &lt;linux/spinlock.h&gt;

That works nicely for non-RT enabled kernels, but on RT enabled kernels
spinlocks are based on rtmutexes, which creates another circular header
dependency as &lt;linux/spinlocks.h&gt; will require &lt;linux/rtmutex.h&gt;.

Include &lt;linux/rbtree_types.h&gt; instead.

Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Link: https://lore.kernel.org/r/20210815211303.598003167@linutronix.de
</content>
</entry>
<entry>
<title>locking/rtmutex: Prevent future include recursion hell</title>
<updated>2021-08-17T15:27:28+00:00</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2021-08-15T21:28:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a403abbdc715986760821e67731d60ff65bde4bd'/>
<id>urn:sha1:a403abbdc715986760821e67731d60ff65bde4bd</id>
<content type='text'>
rtmutex only needs raw_spinlock_t, but it includes spinlock_types.h, which
is not a problem on an non RT enabled kernel.

RT kernels substitute regular spinlocks with 'sleeping' spinlocks, which
are based on rtmutexes, and therefore must be able to include rtmutex.h.

Include &lt;linux/spinlock_types_raw.h&gt; instead.

Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Link: https://lore.kernel.org/r/20210815211303.428224188@linutronix.de
</content>
</entry>
<entry>
<title>locking/rtmutex: Provide rt_mutex_base_is_locked()</title>
<updated>2021-08-17T15:04:35+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2021-08-15T21:28:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6bc8996add9f82d0153b0be44efe282bd45dc702'/>
<id>urn:sha1:6bc8996add9f82d0153b0be44efe282bd45dc702</id>
<content type='text'>
Provide rt_mutex_base_is_locked(), which will be used for various wrapped
locking primitives for RT.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Link: https://lore.kernel.org/r/20210815211302.899572818@linutronix.de
</content>
</entry>
<entry>
<title>locking/rtmutex: Split out the inner parts of 'struct rtmutex'</title>
<updated>2021-08-17T15:04:01+00:00</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2021-08-15T21:27:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=830e6acc8a1cafe153a0d88f9b2455965b396131'/>
<id>urn:sha1:830e6acc8a1cafe153a0d88f9b2455965b396131</id>
<content type='text'>
RT builds substitutions for rwsem, mutex, spinlock and rwlock around
rtmutexes. Split the inner working out so each lock substitution can use
them with the appropriate lockdep annotations. This avoids having an extra
unused lockdep map in the wrapped rtmutex.

No functional change.

Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Link: https://lore.kernel.org/r/20210815211302.784739994@linutronix.de
</content>
</entry>
<entry>
<title>locking/rtmutex: Remove rt_mutex_is_locked()</title>
<updated>2021-08-17T15:00:08+00:00</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2021-08-15T21:27:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f07ec52202ca5bfc79d30ca7c54f86454eb1a9b0'/>
<id>urn:sha1:f07ec52202ca5bfc79d30ca7c54f86454eb1a9b0</id>
<content type='text'>
There are no more users left.

Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Link: https://lore.kernel.org/r/20210815211302.552218335@linutronix.de
</content>
</entry>
<entry>
<title>locking/rtmutex: Set proper wait context for lockdep</title>
<updated>2021-08-17T14:38:50+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2021-08-15T21:27:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b41cda03765580caf7723b8c1b672d191c71013f'/>
<id>urn:sha1:b41cda03765580caf7723b8c1b672d191c71013f</id>
<content type='text'>
RT mutexes belong to the LD_WAIT_SLEEP class. Make them so.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Link: https://lore.kernel.org/r/20210815211302.031014562@linutronix.de
</content>
</entry>
<entry>
<title>locking/rtmutex: Remove empty and unused debug stubs</title>
<updated>2021-03-29T13:57:03+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2021-03-26T15:29:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8188d74e68174b11ff7c4a635ffc8fd31eacc6b9'/>
<id>urn:sha1:8188d74e68174b11ff7c4a635ffc8fd31eacc6b9</id>
<content type='text'>
No users or useless and therefore just ballast.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Acked-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Link: https://lore.kernel.org/r/20210326153943.549192485@linutronix.de
</content>
</entry>
</feed>
