[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20241114163208.1821892-1-jon@nutanix.com>
Date: Thu, 14 Nov 2024 09:32:08 -0700
From: Jon Kohler <jon@...anix.com>
To: Ingo Molnar <mingo@...hat.com>, Peter Zijlstra <peterz@...radead.org>,
Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Steven Rostedt <rostedt@...dmis.org>, Ben Segall <bsegall@...gle.com>,
Mel Gorman <mgorman@...e.de>, Valentin Schneider <vschneid@...hat.com>,
linux-kernel@...r.kernel.org
Cc: Jon Kohler <jon@...anix.com>
Subject: [PATCH] sched/rt: add lockdep annotations for rq_{off|on}line_rt
Remove code comment assumptions in favor of lockdep assertions.
Signed-off-by: Jon Kohler <jon@...anix.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
Powered by blists - more mailing lists