From: Breno Leitao <leitao@debian.org>
To: Andrea Righi <arighi@nvidia.com>
Cc: Christian Loehle <christian.loehle@arm.com>,
Tejun Heo <tj@kernel.org>, David Vernet <void@manifault.com>,
Changwoo Min <changwoo@igalia.com>,
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>,
K Prateek Nayak <kprateek.nayak@amd.com>,
sched-ext@lists.linux.dev, linux-kernel@vger.kernel.org,
bpf@vger.kernel.org, kernel-team@meta.com
Subject: Re: [PATCH] sched_ext: Print deprecation warnings only once
Date: Tue, 23 Jun 2026 09:45:06 -0700 [thread overview]
Message-ID: <ajq30ImUfS9hQV0a@gmail.com> (raw)
In-Reply-To: <ajqr_biPOFkugwIx@gpd4>
On Tue, Jun 23, 2026 at 05:53:33PM +0200, Andrea Righi wrote:
> Hi Breno and Christian,
>
> On Tue, Jun 23, 2026 at 04:45:55PM +0100, Christian Loehle wrote:
> > On 6/23/26 15:38, Breno Leitao wrote:
> > > The deprecation notices for direct p->scx.slice/dsq_vtime writes and for
> > > ops->cpu_acquire/release() use plain pr_warn(), so they repeat on every
> > > scheduler (re)load and flood the kernel log.
> > > > The slice/dsq_vtime notice is emitted from the BPF verifier's
> > > btf_struct_access callback, which runs once per write access and is
> > > re-evaluated as the verifier explores paths, so loading a single
> > > scheduler can print it several times. The cpu_acquire/release notice is
> > > printed on every scheduler enable.
> > >
> > > Switch both to pr_warn_once() so each deprecation is reported a single
> > > time, and add the missing newline to the slice/dsq_vtime message.
> >
> > I guess this should be warned for once per BPF scheduler like
> > sch->warned_deprecated_rq
>
> Yeah, I agree. The thing is that we can load multiple different BPF schedulers,
> and we'd want to get these messages for each of them. So ideally we need
> something like sch->warned_deprecated_rq.
Agreed, pr_warn_once() is too coarse - it mutes the notice for every
scheduler loaded after the first one since boot.
For ops->cpu_acquire/release() this is easy: the notice comes from
validate_ops(), which has the scx_sched, so I'll gate it on a
per-scheduler warned_deprecated_cpu_rel flag, just like
warned_deprecated_rq.
The slice/dsq_vtime notice is the one I wanted to ask about. It's
emitted from bpf_scx_btf_struct_access(), the .btf_struct_access
verifier callback.
That runs at program load/verification time, before the struct_ops is
registered and the scx_sched is allocated (that only happens later in
scx_enable()). Any idea on what to do in this case?
Thanks,
--breno
next prev parent reply other threads:[~2026-06-23 16:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-23 14:38 [PATCH] sched_ext: Print deprecation warnings only once Breno Leitao
2026-06-23 15:45 ` Christian Loehle
2026-06-23 15:53 ` Andrea Righi
2026-06-23 16:45 ` Breno Leitao [this message]
2026-06-23 17:33 ` Andrea Righi
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=ajq30ImUfS9hQV0a@gmail.com \
--to=leitao@debian.org \
--cc=arighi@nvidia.com \
--cc=bpf@vger.kernel.org \
--cc=bsegall@google.com \
--cc=changwoo@igalia.com \
--cc=christian.loehle@arm.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=kernel-team@meta.com \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=sched-ext@lists.linux.dev \
--cc=tj@kernel.org \
--cc=vincent.guittot@linaro.org \
--cc=void@manifault.com \
--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