From: Shrikanth Hegde <sshegde@linux.ibm.com>
To: Steven Rostedt <rostedt@goodmis.org>,
Peter Zijlstra <peterz@infradead.org>
Cc: juri.lelli@redhat.com, vincent.guittot@linaro.org,
dietmar.eggemann@arm.com, bsegall@google.com, mgorman@suse.de,
vschneid@redhat.com, clrkwllms@kernel.org,
linux-kernel@vger.kernel.org, linux-rt-devel@lists.linux.dev,
Linus Torvalds <torvalds@linux-foundation.org>,
mingo@kernel.org, Thomas Gleixner <tglx@linutronix.de>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Madhavan Srinivasan <maddy@linux.ibm.com>,
Nicholas Piggin <npiggin@gmail.com>
Subject: Re: [PATCH] sched: Further restrict the preemption modes
Date: Thu, 26 Feb 2026 11:00:14 +0530 [thread overview]
Message-ID: <127c4772-7352-41a8-b30d-8b869751e907@linux.ibm.com> (raw)
In-Reply-To: <20260225194809.1f5e44a6@fedora>
On 2/26/26 6:18 AM, Steven Rostedt wrote:
> On Wed, 25 Feb 2026 11:53:45 +0100
> Peter Zijlstra <peterz@infradead.org> wrote:
>
>> Oh, that reminds me, Steve, would it make sense to have
>> task_struct::se.sum_exec_runtime as a trace-clock?
>
> That's unique per task right? As tracing is global it requires the
> clock to be monotonic, and I'm guessing a single sched_switch will
> break that.
>
> Now if one wants to trace how long kernel paths are, I'm sure we could
> trivially make a new tracer to do so.
>
> echo max_kernel_time > current_tracer
That is good idea.
>
> or something like that, that could act like a latency tracer that
> monitors how long any kernel thread runs without being preempted.
>
> -- Steve
With preempt=full/lazy a long running kernel task can get
preempted if it is running in preemptible section. that's okay.
My intent was to have a tracer that can say, look this kernel task took this much time
before it completed. For some task such as long page walk, we know it is okay since
it is expected to take time, but for some task such as reading watchdog shouldn't take
time. But on large system's doing these global variable update itself may take a long time.
Updating less often was a fix which had fixed that lockup IIRC. So how can we identify such
opportunities. Hopefully I am making sense.
Earlier, one would have got a softlockup when things were making very slow progress(one's
which didn't have a cond_resched)
Now, we don't know unless we see a workload regression.
If we don't have a tracer/mechanism today which gives kernel_tasks > timelimit,
then having a new one would help.
next prev parent reply other threads:[~2026-02-26 5:31 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-19 10:15 [PATCH] sched: Further restrict the preemption modes Peter Zijlstra
2026-01-06 15:23 ` Valentin Schneider
2026-01-06 16:40 ` Steven Rostedt
2026-01-09 11:23 ` Shrikanth Hegde
2026-02-25 10:53 ` Peter Zijlstra
2026-02-25 12:56 ` Shrikanth Hegde
2026-02-26 0:48 ` Steven Rostedt
2026-02-26 5:30 ` Shrikanth Hegde [this message]
2026-02-26 17:22 ` Steven Rostedt
2026-02-27 9:09 ` Shrikanth Hegde
2026-02-27 14:53 ` Steven Rostedt
2026-02-27 15:28 ` Shrikanth Hegde
2026-03-09 9:13 ` Shrikanth Hegde
2026-02-24 15:45 ` Ciunas Bennett
2026-02-24 17:11 ` Sebastian Andrzej Siewior
2026-02-25 9:56 ` Ciunas Bennett
2026-02-25 2:30 ` Ilya Leoshkevich
2026-02-25 16:33 ` Christian Borntraeger
2026-02-25 18:30 ` Douglas Freimuth
2026-03-03 9:15 ` Ciunas Bennett
2026-03-03 11:52 ` Peter Zijlstra
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=127c4772-7352-41a8-b30d-8b869751e907@linux.ibm.com \
--to=sshegde@linux.ibm.com \
--cc=bigeasy@linutronix.de \
--cc=bsegall@google.com \
--cc=clrkwllms@kernel.org \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-devel@lists.linux.dev \
--cc=maddy@linux.ibm.com \
--cc=mgorman@suse.de \
--cc=mingo@kernel.org \
--cc=npiggin@gmail.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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