From: Jon Kohler <jon@nutanix.com>
To: Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Valentin Schneider <vschneid@redhat.com>,
linux-kernel@vger.kernel.org
Cc: Jon Kohler <jon@nutanix.com>
Subject: [PATCH] sched/rt: add lockdep annotations for rq_{off|on}line_rt
Date: Thu, 14 Nov 2024 09:32:08 -0700 [thread overview]
Message-ID: <20241114163208.1821892-1-jon@nutanix.com> (raw)
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
reply other threads:[~2024-11-14 16:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241114163208.1821892-1-jon@nutanix.com \
--to=jon@nutanix.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®