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: Wed, 24 Jun 2026 01:25:27 -0700 [thread overview]
Message-ID: <ajuTUNjgdHjjx2dB@gmail.com> (raw)
In-Reply-To: <ajrDgwLnu9_FWPUp@gpd4>
Hello Andrea,
On Tue, Jun 23, 2026 at 07:33:55PM +0200, Andrea Righi wrote:
> Hm... actually thinking more about it, the existing behavior seems fine already.
I have very few hosts in the Meta fleet that are unnecessarily spammy:
# dmesg | grep -c "ops->cpu_acquire/release() are deprecated, use sched_switch TP instead"
73
# dmesg | grep -c "sched_ext: Writing directly to p->scx.slice/dsq_vtime is deprecated, use scx_bpf_task_set_slice/dsq_vtime()"
855
And they are unnecessary, given they show up many times within the same
second, like, 42x times in last second:
# dmesg | grep "sched_ext: Writing directly to p->scx.slice/dsq_vtime is deprecated" | grep 806105 | wc -l
42
# dmesg | grep "sched_ext: Writing directly to p->scx.slice/dsq_vtime is deprecated" | grep 806105 | head
# [806105.018400] sched_ext: Writing directly to p->scx.slice/dsq_vtime is deprecated, use scx_bpf_task_set_slice/dsq_vtime()
# [806105.042160] sched_ext: Writing directly to p->scx.slice/dsq_vtime is deprecated, use scx_bpf_task_set_slice/dsq_vtime()
# [806105.065668] sched_ext: Writing directly to p->scx.slice/dsq_vtime is deprecated, use scx_bpf_task_set_slice/dsq_vtime()
...
>
> The ops->cpu_acquire/release() warning is only emitted from validate_ops(),
> which runs when the scheduler is registered. It's not in the runtime callback
> path, so we should already get one warning per scheduler registration. That
> means we don't need a warned_deprecated_cpu_rel flag.
>
> For slice/dsq_vtime, the warning is emitted when the verifier sees write
> accesses to those fields. It can fire multiple times while loading one sched_ext
> scheduler, depending on how many such accesses the verifier observes, but this
> also seems correct.
>
> If we want to prevent potential log spam maybe we can just change those
> pr_warn() to pr_warn_ratelimited()?
Ack, let me transform these pr_warn() in pr_warn_ratelimted() then.
THanks
prev parent reply other threads:[~2026-06-24 8:25 UTC|newest]
Thread overview: 6+ 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
2026-06-23 17:33 ` Andrea Righi
2026-06-24 8:25 ` Breno Leitao [this message]
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=ajuTUNjgdHjjx2dB@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.