mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: K Prateek Nayak <kprateek.nayak@amd.com>
To: Aaron Tomlin <atomlin@atomlin.com>
Cc: <mingo@redhat.com>, <peterz@infradead.org>,
	<juri.lelli@redhat.com>, <vincent.guittot@linaro.org>,
	<dietmar.eggemann@arm.com>, <rostedt@goodmis.org>,
	<bsegall@google.com>, <mgorman@suse.de>, <vschneid@redhat.com>,
	<sshegde@linux.ibm.com>, <neelx@suse.com>, <sean@ashe.io>,
	<mproche@gmail.com>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1] sched/deadline: Log Fair Server re-enablement for symmetry with debugfs
Date: Mon, 12 Jan 2026 10:44:03 +0530	[thread overview]
Message-ID: <4b3cabf1-76ff-4d1a-be1f-ab3fe3bfd935@amd.com> (raw)
In-Reply-To: <wfxeuwsqwoz5zb4uebsjeew2hjq5xqnnwygjgbwka3f5ftzcc5@fwtxyuvt5sak>

Hello Aaron,

On 1/9/2026 8:00 PM, Aaron Tomlin wrote:
> Consider a strictly partitioned environment utilising isolcpus=domain,5-8
> alongside nohz_full=5-8. A latency-critical SCHED_FIFO task executing on
> CPU 5 that never enters the kernel requires absolute isolation. If a
> SCHED_NORMAL (CFS) task is enqueued - perhaps a CPU-specific kthread or
> some other user-specific task - the current architecture wakes the Deadline
> Server, which in turn restarts the clock-tick - see sched_can_stop_tick().
> By temporarily disabling the Fair Server via the debug interface, an
> administrator can preclude this interruption during a specific, sensitive
> window of execution, before restoring standard operation once the critical
> phase has concluded.

I believe the suggested solution to that was to trace the reason for the
kthread/fair task waking up on isolated CPUs and prevent the wakeup if
it is for some unnecessary operation as opposed to disabling the fair
server.

We have tools like https://docs.kernel.org/trace/osnoise-tracer.html to
capture these noise. Trace the noise, bring up the case where isolation
is broken on the current *upstream* kernel to the mailing list, and we
can solve it for everyone instead of disabling fair server as a duct
tape.

[..snip..]

>> I still think once the fair server is disabled, the pieces are for the
>> user to keep. I wouldn't want us debugging:
>>
>>     Fair server disabled in CPU X ...
>>     Fair server re-enabled in CPU X ...
>>     INFO: rcu_tasks detected stalls ...
>>
>> only to realise the stalls were a result of starving the fair threads
>> and the fair server didn't run in time / didn't have enough B/W to
>> prevent that stall.

[..snip..]
> Regarding your concern about debugging RCU stalls and the "keep the pieces"
> philosophy: I would argue that this is precisely why the symmetry in
> logging is essential.

I would argue that fiddling with the fair server is a terrible idea and
once the user disables it, all bets are off. It becomes their headache
to solve.

> 
> Without the "re-enabled" marker, the audit trail is incomplete. If a system
> stalls, seeing only a "Fair server disabled" message leaves the duration of
> the starvation event ambiguous. By explicitly logging the re-enablement, we
> establish a definitive timeline. If an RCU stall occurs shortly after the
> server is re-enabled, the timestamp provides the necessary evidence to
> correlate the crash directly with the preceding starvation
> period — confirming that the user's intervention was indeed the root cause.
> Transparency, in this case, expedites the diagnosis of "user-induced"
> failure.

Juri, Peter, is changing the fair server's bandwidth frequently very
common scenario is the field?

If not, can we add a pr_warn() for when the fair server's parameters
are changed by the userspace just to catch any absurd values that
reduce the bandwidth to a minimum without disabling the server?

I can do something absolutely stupid like this without dmesg logging
anything that would indicate I'm being stupid:

    # echo 4000000000 > /sys/kernel/debug/sched/fair_server/cpu0/period
    # echo 1 > /sys/kernel/debug/sched/fair_server/cpu0/runtime
    # sudo taskset -c 0 chrt -r 99 ~/scripts/loop&
    # taskset -c 0 bash -c 'mkdir /sys/fs/cgroup/cg0; echo $$ > /sys/fs/cgroup/cg0/cgroup.procs;'

    ... wait for a while

     INFO: task bash:4272 blocked for more than 120 seconds.
           Not tainted 6.19.0-rc1-tip+ #162
     "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
     task:bash            state:D stack:0     pid:4272  tgid:4272  ppid:4271   task_flags:0x400100 flags:0x00080000


A taint might be too far but a log should be acceptable?

-- 
Thanks and Regards,
Prateek


  reply	other threads:[~2026-01-12  5:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-09  3:19 [PATCH 0/1] sched/deadline: Log Fair Server re-enablement Aaron Tomlin
2026-01-09  3:19 ` [PATCH 1/1] sched/deadline: Log Fair Server re-enablement for symmetry with debugfs Aaron Tomlin
2026-01-09  6:17   ` K Prateek Nayak
2026-01-09 14:30     ` Aaron Tomlin
2026-01-12  5:14       ` K Prateek Nayak [this message]
2026-01-12 14:32         ` Aaron Tomlin
2026-01-12 18:48           ` Shrikanth Hegde

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=4b3cabf1-76ff-4d1a-be1f-ab3fe3bfd935@amd.com \
    --to=kprateek.nayak@amd.com \
    --cc=atomlin@atomlin.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=mproche@gmail.com \
    --cc=neelx@suse.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=sean@ashe.io \
    --cc=sshegde@linux.ibm.com \
    --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®