* [PATCH] sched/rt: add lockdep annotations for rq_{off|on}line_rt
@ 2024-11-14 16:32 Jon Kohler
0 siblings, 0 replies; only message in thread
From: Jon Kohler @ 2024-11-14 16:32 UTC (permalink / raw)
To: Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
Dietmar Eggemann, Steven Rostedt, Ben Segall, Mel Gorman,
Valentin Schneider, linux-kernel
Cc: Jon Kohler
Remove code comment assumptions in favor of lockdep assertions.
Signed-off-by: Jon Kohler <jon@nutanix.com>
---
kernel/sched/rt.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 172c588de542..2b10c930620e 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -2407,9 +2407,10 @@ static void task_woken_rt(struct rq *rq, struct task_struct *p)
push_rt_tasks(rq);
}
-/* Assumes rq->lock is held */
static void rq_online_rt(struct rq *rq)
{
+ lockdep_assert_rq_held(rq);
+
if (rq->rt.overloaded)
rt_set_overload(rq);
@@ -2418,9 +2419,10 @@ static void rq_online_rt(struct rq *rq)
cpupri_set(&rq->rd->cpupri, rq->cpu, rq->rt.highest_prio.curr);
}
-/* Assumes rq->lock is held */
static void rq_offline_rt(struct rq *rq)
{
+ lockdep_assert_rq_held(rq);
+
if (rq->rt.overloaded)
rt_clear_overload(rq);
--
2.43.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-11-14 16:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-14 16:32 [PATCH] sched/rt: add lockdep annotations for rq_{off|on}line_rt Jon Kohler
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®