From: K Prateek Nayak <kprateek.nayak@amd.com>
To: Aaron Tomlin <atomlin@atomlin.com>, <mingo@redhat.com>,
<peterz@infradead.org>, <juri.lelli@redhat.com>,
<vincent.guittot@linaro.org>
Cc: <dietmar.eggemann@arm.com>, <rostedt@goodmis.org>,
<bsegall@google.com>, <mgorman@suse.de>, <vschneid@redhat.com>,
<zhanxusheng1024@gmail.com>, <neelx@suse.com>,
<chjohnst@mail.com>, <mproche@mail.com>, <sean@ashe.io>,
<steve@abita.co>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4 1/5] sched/debug: Protect lockless rq->rd access in print_dl_rq()
Date: Mon, 10 Aug 2026 12:20:27 +0530 [thread overview]
Message-ID: <23de7d75-cde1-4df2-b5ac-71922102a6ca@amd.com> (raw)
In-Reply-To: <20260810015812.428999-2-atomlin@atomlin.com>
Hello Aaron,
On 8/10/2026 7:28 AM, Aaron Tomlin wrote:
> @@ -1089,9 +1090,14 @@ void print_dl_rq(struct seq_file *m, int cpu, struct dl_rq *dl_rq)
> SEQ_printf(m, " .%-30s: %lu\n", #x, (unsigned long)(dl_rq->x))
>
> PU(dl_nr_running);
> - dl_bw = &cpu_rq(cpu)->rd->dl_bw;
> - SEQ_printf(m, " .%-30s: %lld\n", "dl_bw->bw", dl_bw->bw);
> - SEQ_printf(m, " .%-30s: %lld\n", "dl_bw->total_bw", dl_bw->total_bw);
> + rcu_read_lock();
> + rd = READ_ONCE(cpu_rq(cpu)->rd);
nit. Why not rcu_dereference_all() here to keep symmetry with the
update side that now uses rcu_assign_pointer()?
> + if (rd) {
I don't think rq->rd can ever be NULL after the scheduler has
initialized.
> + dl_bw = &rd->dl_bw;
> + SEQ_printf(m, " .%-30s: %lld\n", "dl_bw->bw", dl_bw->bw);
> + SEQ_printf(m, " .%-30s: %lld\n", "dl_bw->total_bw", dl_bw->total_bw);
> + }
> + rcu_read_unlock();
>
> #undef PU
> }
--
Thanks and Regards,
Prateek
next prev parent reply other threads:[~2026-08-10 6:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-10 1:58 [PATCH v4 0/5] sched/debug: Introduce per-CPU debugfs files Aaron Tomlin
2026-08-10 1:58 ` [PATCH v4 1/5] sched/debug: Protect lockless rq->rd access in print_dl_rq() Aaron Tomlin
2026-08-10 6:50 ` K Prateek Nayak [this message]
2026-08-10 13:53 ` Daniel Vacek
2026-08-10 1:58 ` [PATCH v4 2/5] sched/debug: Protect lockless rq->curr access in print_cpu() Aaron Tomlin
2026-08-10 1:58 ` [PATCH v4 3/5] sched/debug: Protect lockless p->mm access in sched_show_numa() Aaron Tomlin
2026-08-10 1:58 ` [PATCH v4 4/5] sched/fair: Use list_for_each_entry_rcu() in print_cfs_stats() Aaron Tomlin
2026-08-10 1:58 ` [PATCH v4 5/5] sched/debug: Introduce per-CPU debugfs files Aaron Tomlin
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=23de7d75-cde1-4df2-b5ac-71922102a6ca@amd.com \
--to=kprateek.nayak@amd.com \
--cc=atomlin@atomlin.com \
--cc=bsegall@google.com \
--cc=chjohnst@mail.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=mproche@mail.com \
--cc=neelx@suse.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=sean@ashe.io \
--cc=steve@abita.co \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
--cc=zhanxusheng1024@gmail.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