* [RANT][PATCH] sched_ext: Fix stale fair load weight after renice under SCX
@ 2026-12-04 14:35 Steven Rostedt
2026-12-04 15:19 ` Tejun Heo
` (2 more replies)
0 siblings, 3 replies; 19+ messages in thread
From: Steven Rostedt @ 2026-12-04 14:35 UTC (permalink / raw)
To: LKML, sched-ext
Cc: Tejun Heo, David Vernet, Andrea Righi, Changwoo Min,
Peter Zijlstra, Ingo Molnar, Thomas Gleixner, Linus Torvalds,
Jonathan Corbet, Greg Kroah-Hartman, Sasha Levin
From: Steven Rostedt (LLM) <rostedt@goodmis.org>
While working on my scheduler governors using Claude, it discovered a bug
with the sched_ext reweight_task_scx() function. It wrote up the change
log and created a patch. The change log is below which is mostly from
Claude, but I did tweak it a little.
set_load_weight() hands a changed weight to the class's ->reweight_task
and only writes p->se.load itself when the class has no such hook:
if (update_load && p->sched_class->reweight_task)
p->sched_class->reweight_task(task_rq(p), p, &lw);
else
p->se.load = lw;
reweight_task_fair() updates se.load as part of reweighting, but
reweight_task_scx() only updates p->scx.weight. So a task whose nice
value changes while it is in the ext class keeps the fair load weight it
had before, and nothing refreshes it when the task goes back to fair:
neither switched_from_scx() nor scx_disable_task() does, and fair never
recomputes a task's weight when it switches in. Forks copy the stale
se.load too.
There are two ways to hit it:
- renice a task while a BPF scheduler runs it, then unload the
scheduler (or move the task out of SCHED_EXT);
- move a task from SCHED_EXT to SCHED_NORMAL and change its nice value
in the same sched_setattr(). set_load_weight() then runs while the
task is still in the ext class but already disabled, and
reweight_task_scx() returns before it gets anywhere.
Reproduced on v7.4-rc5 under QEMU with scx_simple (switch-all) for the
first case and scx_qmap -p for the second. Two CPU-bound tasks pinned to
one CPU, nice 0 and nice 10, measured for 3s after the nice-10 one was
reniced under SCX and the scheduler unloaded:
nice 0 nice 10 ratio nice-10 weight
no sched_ext (control) 2711ms 290ms 9.33 112640
reniced under sched_ext 1500ms 1501ms 1.00 1048576 (nice 0)
... with this patch 2708ms 292ms 9.29 112640
In the sched_setattr() case, a SCHED_EXT task switched to SCHED_NORMAL
with nice 5 kept weight 1048576 (nice 0) instead of 343040.
The stale weight survives wakeups and is only corrected by a later
set_load_weight() for the task, such as another renice while in fair.
Store the new weight in se.load at the top of reweight_task_scx(),
before its early returns, so that the sched_setattr() case is covered
too: storing it next to the p->scx.weight update fixes the first case
but not the second. The task is not on a cfs_rq while it is in the ext
class, so this is the same plain store set_load_weight() already does for
rt, dl and idle-policy tasks.
The bug was found by Claude Code while working on unrelated scheduler
changes. It also wrote the QEMU reproducer, the fix and this changelog.
Cc: stable@vger.kernel.org
Fixes: f0e1a0643a59 ("sched_ext: Implement BPF extensible scheduler class")
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
This is my first completely vibe coded patch. Working on my scheduler
governors project using Claude Max (thank you Anthropic for the tokens!),
the agent discovered this bug in sched_ext. It asked me if I wanted to send
it upstream. I first asked it to make sure that it was still an issue with
v7.4-rc5 as the tree I was working on was at v7.2. It looked at v7.4-rc5
and told me that it didn't find anything to address the bug. It then built
v7.4-rc5, booted it in qemu, created a test for it, and found that it was
still a bug.
I told it to fix it, which it did, but the first patch was a bit invasive
in the core scheduler code. I asked it if it could fix it in the sched_ext
code, where it said "That's a great idea" and created this one-line patch.
It then wrote the change log and told me how to send it and who to send it
to. It even asked me if I wanted it to send it! I told it "No!". (Does this
mean I've been talking with AI bots directly with no human in the loop?? I
thought they were simply cut-and-pasting the output :-/).
It noticed that the "Assisted-by" tag is no longer needed, but I insisted
that it included it. As I looked at the "From:" line, I thought to myself,
it's going to say that I'm the author of this patch. THAT IS A LIE!!!!
<RANT>
This is my first full experience with an AI agent doing code. It was not
much different than working with junior developers that I have mentored in
the past. I just told it what to do. It found a bug. It created a test case
and proved it to be true. I just sat back and watched the token counter rise.
Now it expects this patch to be sent with me as the author. I can't! God
Dammit! I entered open source programming because I loved looking at the
output from very talented programmers. I learned from them so one day I
could be just as talented and show off what I could do. Open Source is a
great place to find like minded individuals who are talented and you can
work together teaching and learning at the same time. I've always said that
my code was my art. I'm a huge advocate of "giving credit where credit is
due". If I got something from someone, I always gave them credit even when
it went against my interests. I love showing off the work of others too.
I didn't write this patch. Putting my name on it is exactly the same as
going to ChatGPT and having it create a picture and say that I drew it.
The picture is art and so is code. I will not claim any code created by an
agent as my own. For this patch, I'm adding "(LLM)" to my "From:" line to
point out that this came from an agent and not from me. I only supervised
it, I didn't create it.
God help us for the future of programming if most people entering are just
using AI agents and not ever writing the code themselves. The first version
of this patch worked perfectly fine. It was my decades of experience that
told me it wasn't proper engineering to do it that way. People who just
vide code will never get the experience for proper engineering. AI agents
could possibly handle these bad coding choices, but they are going to
compound and eventually these bad decisions AI makes will become an issue
even for AI. The reason I know these were bad decisions is because of
decades of experience in making bad decisions and understanding their
impact. I learned this the hard way and I'm much better because of that
now. AI makes mistakes all the time (I even saw in the logs that it tried
something and it accidentally deleted something it didn't mean to and had
to redo it). But the engineering design mistakes it makes now will require
destroying the entire project and rewriting later. Maybe AI could handle
that but will people understand what was wrong with the design if they were
not the ones that created it? It's going to be costly regardless. Tokens
had better become cheaper by then!
Anyway, I'm keeping the Assisted-by tag and marking my authorship with
"(LLM)" to make it obvious that I did not write this code. I wasn't invited
to the last Maintainers Summit so I couldn't voice my opinion on the matter
when they decided to get rid of the "Assisted-by" tag. One of the
complaints was people who vide coded didn't add that tag and we couldn't
enforce it. Well, to me, those that do that are no better than those using
ChatGPT to create artwork and calling it their own!
</RANT>
kernel/sched/ext/ext.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/kernel/sched/ext/ext.c b/kernel/sched/ext/ext.c
index efa1d01d03af..81404b37fbd1 100644
--- a/kernel/sched/ext/ext.c
+++ b/kernel/sched/ext/ext.c
@@ -5019,6 +5019,15 @@ static void reweight_task_scx(struct rq *rq, struct task_struct *p,
lockdep_assert_rq_held(task_rq(p));
+ /*
+ * set_load_weight() leaves se.load to the class when it has
+ * ->reweight_task. Keep it current: it is the weight the task takes
+ * back to the fair class. This must come before the early returns
+ * below, as a task switching from SCX to fair through
+ * sched_setscheduler() is reweighted here after scx_disable_task().
+ */
+ p->se.load = *lw;
+
if (task_dead_and_done(p))
return;
--
2.53.0
^ permalink raw reply related [flat|nested] 19+ messages in thread* Re: [RANT][PATCH] sched_ext: Fix stale fair load weight after renice under SCX
2026-12-04 14:35 [RANT][PATCH] sched_ext: Fix stale fair load weight after renice under SCX Steven Rostedt
@ 2026-12-04 15:19 ` Tejun Heo
2026-12-04 15:40 ` Andrea Righi
2026-12-04 18:06 ` Linus Torvalds
2 siblings, 0 replies; 19+ messages in thread
From: Tejun Heo @ 2026-12-04 15:19 UTC (permalink / raw)
To: Steven Rostedt
Cc: LKML, sched-ext, David Vernet, Andrea Righi, Changwoo Min,
Peter Zijlstra, Ingo Molnar, Thomas Gleixner, Linus Torvalds,
Jonathan Corbet, Greg Kroah-Hartman, Sasha Levin
Applied to sched_ext/for-7.4-fixes with "# v6.12+" added to the stable tag.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [RANT][PATCH] sched_ext: Fix stale fair load weight after renice under SCX
2026-12-04 14:35 [RANT][PATCH] sched_ext: Fix stale fair load weight after renice under SCX Steven Rostedt
2026-12-04 15:19 ` Tejun Heo
@ 2026-12-04 15:40 ` Andrea Righi
2026-12-04 15:44 ` Tejun Heo
` (2 more replies)
2026-12-04 18:06 ` Linus Torvalds
2 siblings, 3 replies; 19+ messages in thread
From: Andrea Righi @ 2026-12-04 15:40 UTC (permalink / raw)
To: Steven Rostedt
Cc: LKML, sched-ext, Tejun Heo, David Vernet, Changwoo Min,
Peter Zijlstra, Ingo Molnar, Thomas Gleixner, Linus Torvalds,
Jonathan Corbet, Greg Kroah-Hartman, Sasha Levin, Zicheng Qu
Hi Steven,
On Fri, Dec 04, 2026 at 09:35:07AM -0500, Steven Rostedt wrote:
> From: Steven Rostedt (LLM) <rostedt@goodmis.org>
>
> While working on my scheduler governors using Claude, it discovered a bug
> with the sched_ext reweight_task_scx() function. It wrote up the change
> log and created a patch. The change log is below which is mostly from
> Claude, but I did tweak it a little.
>
> set_load_weight() hands a changed weight to the class's ->reweight_task
> and only writes p->se.load itself when the class has no such hook:
>
> if (update_load && p->sched_class->reweight_task)
> p->sched_class->reweight_task(task_rq(p), p, &lw);
> else
> p->se.load = lw;
>
> reweight_task_fair() updates se.load as part of reweighting, but
> reweight_task_scx() only updates p->scx.weight. So a task whose nice
> value changes while it is in the ext class keeps the fair load weight it
> had before, and nothing refreshes it when the task goes back to fair:
> neither switched_from_scx() nor scx_disable_task() does, and fair never
> recomputes a task's weight when it switches in. Forks copy the stale
> se.load too.
We already discussed this with Zicheng and Peter [1]. The approach we
settled on was to rebuild the load weight in switching_to_fair(), so
fair prepares its own state before enqueue, rather than having sched_ext
maintain fair's inactive state.
> --- a/kernel/sched/ext/ext.c
> +++ b/kernel/sched/ext/ext.c
> @@ -5019,6 +5019,15 @@ static void reweight_task_scx(struct rq *rq, struct task_struct *p,
>
> lockdep_assert_rq_held(task_rq(p));
>
> + /*
> + * set_load_weight() leaves se.load to the class when it has
> + * ->reweight_task. Keep it current: it is the weight the task takes
> + * back to the fair class. This must come before the early returns
> + * below, as a task switching from SCX to fair through
> + * sched_setscheduler() is reweighted here after scx_disable_task().
> + */
> + p->se.load = *lw;
> +
There is also the associated PELT state to consider here,
se->avg.load_avg depends on the load weight, so updating se.load alone
can leave them inconsistent when the task returns to fair.
Zicheng's v4 series [2] addressed both pieces: rebuilding the weight
in switching_to_fair() and recalculating load_avg before attaching the
entity back to fair.
Peter, Zicheng, do you remember why that series did not land upstream?
Was there any open issue to address, or did the series simply fall
through the cracks?
Could we revisit that approach before adding the fair-state update
to reweight_task_scx()?
[1] https://lore.kernel.org/r/20260527112624.GT3126523@noisy.programming.kicks-ass.net
[2] https://lore.kernel.org/r/20260624091648.271891-1-quzicheng@huawei.com
[3] https://lore.kernel.org/r/ajvGJ4Uui745fbBA@gpd4
Thanks,
-Andrea
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: [RANT][PATCH] sched_ext: Fix stale fair load weight after renice under SCX
2026-12-04 15:40 ` Andrea Righi
@ 2026-12-04 15:44 ` Tejun Heo
2026-12-04 15:59 ` Steven Rostedt
2026-12-04 16:19 ` Peter Zijlstra
2 siblings, 0 replies; 19+ messages in thread
From: Tejun Heo @ 2026-12-04 15:44 UTC (permalink / raw)
To: Andrea Righi
Cc: Steven Rostedt, LKML, sched-ext, David Vernet, Changwoo Min,
Peter Zijlstra, Ingo Molnar, Thomas Gleixner, Linus Torvalds,
Jonathan Corbet, Greg Kroah-Hartman, Sasha Levin, Zicheng Qu
On Fri, Dec 04, 2026 at 04:40:23PM +0100, Andrea Righi wrote:
> Hi Steven,
>
> On Fri, Dec 04, 2026 at 09:35:07AM -0500, Steven Rostedt wrote:
> > From: Steven Rostedt (LLM) <rostedt@goodmis.org>
> >
> > While working on my scheduler governors using Claude, it discovered a bug
> > with the sched_ext reweight_task_scx() function. It wrote up the change
> > log and created a patch. The change log is below which is mostly from
> > Claude, but I did tweak it a little.
> >
> > set_load_weight() hands a changed weight to the class's ->reweight_task
> > and only writes p->se.load itself when the class has no such hook:
> >
> > if (update_load && p->sched_class->reweight_task)
> > p->sched_class->reweight_task(task_rq(p), p, &lw);
> > else
> > p->se.load = lw;
> >
> > reweight_task_fair() updates se.load as part of reweighting, but
> > reweight_task_scx() only updates p->scx.weight. So a task whose nice
> > value changes while it is in the ext class keeps the fair load weight it
> > had before, and nothing refreshes it when the task goes back to fair:
> > neither switched_from_scx() nor scx_disable_task() does, and fair never
> > recomputes a task's weight when it switches in. Forks copy the stale
> > se.load too.
>
> We already discussed this with Zicheng and Peter [1]. The approach we
> settled on was to rebuild the load weight in switching_to_fair(), so
> fair prepares its own state before enqueue, rather than having sched_ext
> maintain fair's inactive state.
Oh, I missed that. Lemme back out the patch.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [RANT][PATCH] sched_ext: Fix stale fair load weight after renice under SCX
2026-12-04 15:40 ` Andrea Righi
2026-12-04 15:44 ` Tejun Heo
@ 2026-12-04 15:59 ` Steven Rostedt
2026-12-04 16:33 ` Andrea Righi
2026-12-04 16:19 ` Peter Zijlstra
2 siblings, 1 reply; 19+ messages in thread
From: Steven Rostedt @ 2026-12-04 15:59 UTC (permalink / raw)
To: Andrea Righi
Cc: LKML, sched-ext, Tejun Heo, David Vernet, Changwoo Min,
Peter Zijlstra, Ingo Molnar, Thomas Gleixner, Linus Torvalds,
Jonathan Corbet, Greg Kroah-Hartman, Sasha Levin, Zicheng Qu
On Fri, 4 Dec 2026 16:40:23 +0100
Andrea Righi <arighi@nvidia.com> wrote:
> We already discussed this with Zicheng and Peter [1]. The approach we
> settled on was to rebuild the load weight in switching_to_fair(), so
> fair prepares its own state before enqueue, rather than having sched_ext
> maintain fair's inactive state.
Thanks for the update. I'll go back and tell my junior AI agent that its
patch is not going to be accepted, and let it cry over its wasted tokens ;-)
-- Steve
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [RANT][PATCH] sched_ext: Fix stale fair load weight after renice under SCX
2026-12-04 15:59 ` Steven Rostedt
@ 2026-12-04 16:33 ` Andrea Righi
2026-12-04 16:53 ` Steven Rostedt
0 siblings, 1 reply; 19+ messages in thread
From: Andrea Righi @ 2026-12-04 16:33 UTC (permalink / raw)
To: Steven Rostedt
Cc: LKML, sched-ext, Tejun Heo, David Vernet, Changwoo Min,
Peter Zijlstra, Ingo Molnar, Thomas Gleixner, Linus Torvalds,
Jonathan Corbet, Greg Kroah-Hartman, Sasha Levin, Zicheng Qu
On Fri, Dec 04, 2026 at 10:59:14AM -0500, Steven Rostedt wrote:
> On Fri, 4 Dec 2026 16:40:23 +0100
> Andrea Righi <arighi@nvidia.com> wrote:
>
> > We already discussed this with Zicheng and Peter [1]. The approach we
> > settled on was to rebuild the load weight in switching_to_fair(), so
> > fair prepares its own state before enqueue, rather than having sched_ext
> > maintain fair's inactive state.
>
> Thanks for the update. I'll go back and tell my junior AI agent that its
> patch is not going to be accepted, and let it cry over its wasted tokens ;-)
Hehe, tell your junior AI engineer to check on the list for similar
fixes. That should work. :)
-Andrea
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [RANT][PATCH] sched_ext: Fix stale fair load weight after renice under SCX
2026-12-04 16:33 ` Andrea Righi
@ 2026-12-04 16:53 ` Steven Rostedt
2026-12-04 17:04 ` Andrea Righi
0 siblings, 1 reply; 19+ messages in thread
From: Steven Rostedt @ 2026-12-04 16:53 UTC (permalink / raw)
To: Andrea Righi
Cc: LKML, sched-ext, Tejun Heo, David Vernet, Changwoo Min,
Peter Zijlstra, Ingo Molnar, Thomas Gleixner, Linus Torvalds,
Jonathan Corbet, Greg Kroah-Hartman, Sasha Levin, Zicheng Qu
On Fri, 4 Dec 2026 17:33:18 +0100
Andrea Righi <arighi@nvidia.com> wrote:
> Hehe, tell your junior AI engineer to check on the list for similar
> fixes. That should work. :)
It can't because lore blocks bots :-p
-- Steve
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [RANT][PATCH] sched_ext: Fix stale fair load weight after renice under SCX
2026-12-04 16:53 ` Steven Rostedt
@ 2026-12-04 17:04 ` Andrea Righi
2026-12-04 17:16 ` Steven Rostedt
2026-12-04 17:36 ` Sasha Levin
0 siblings, 2 replies; 19+ messages in thread
From: Andrea Righi @ 2026-12-04 17:04 UTC (permalink / raw)
To: Steven Rostedt
Cc: LKML, sched-ext, Tejun Heo, David Vernet, Changwoo Min,
Peter Zijlstra, Ingo Molnar, Thomas Gleixner, Linus Torvalds,
Jonathan Corbet, Greg Kroah-Hartman, Sasha Levin, Zicheng Qu
On Fri, Dec 04, 2026 at 11:53:36AM -0500, Steven Rostedt wrote:
> On Fri, 4 Dec 2026 17:33:18 +0100
> Andrea Righi <arighi@nvidia.com> wrote:
>
> > Hehe, tell your junior AI engineer to check on the list for similar
> > fixes. That should work. :)
>
> It can't because lore blocks bots :-p
Try the following skill.
-Andrea
---
name: Use b4 for lore.kernel.org
description: WebFetch fails on lore.kernel.org due to Anubis anti-bot - use b4 mbox instead
type: feedback
---
Do not use WebFetch for lore.kernel.org URLs - they are blocked by Anubis anti-bot challenge.
**Why:** lore.kernel.org uses Anubis JS challenge that blocks non-browser fetches.
**How to apply:** Use `b4 mbox <message-id>` to download the mbox file, then analyze it locally.
When reviewing a patch series, consider `b4 mbox -a <message-id>` to fetch older
and newer revisions and save them in revision order. Comparing revisions and
their discussions provides context about how the series evolved.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [RANT][PATCH] sched_ext: Fix stale fair load weight after renice under SCX
2026-12-04 17:04 ` Andrea Righi
@ 2026-12-04 17:16 ` Steven Rostedt
2026-12-04 17:27 ` Tejun Heo
2026-12-04 17:29 ` Andrea Righi
2026-12-04 17:36 ` Sasha Levin
1 sibling, 2 replies; 19+ messages in thread
From: Steven Rostedt @ 2026-12-04 17:16 UTC (permalink / raw)
To: Andrea Righi
Cc: LKML, sched-ext, Tejun Heo, David Vernet, Changwoo Min,
Peter Zijlstra, Ingo Molnar, Thomas Gleixner, Linus Torvalds,
Jonathan Corbet, Greg Kroah-Hartman, Sasha Levin, Zicheng Qu
On Fri, 4 Dec 2026 18:04:46 +0100
Andrea Righi <arighi@nvidia.com> wrote:
> On Fri, Dec 04, 2026 at 11:53:36AM -0500, Steven Rostedt wrote:
> > On Fri, 4 Dec 2026 17:33:18 +0100
> > Andrea Righi <arighi@nvidia.com> wrote:
> >
> > > Hehe, tell your junior AI engineer to check on the list for similar
> > > fixes. That should work. :)
> >
> > It can't because lore blocks bots :-p
>
> Try the following skill.
Thanks, I added that, but that still requires me to pass it a message id,
as I don't believe it can browse the list.
-- Steve
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [RANT][PATCH] sched_ext: Fix stale fair load weight after renice under SCX
2026-12-04 17:16 ` Steven Rostedt
@ 2026-12-04 17:27 ` Tejun Heo
2026-12-04 17:38 ` Sasha Levin
2026-12-04 17:29 ` Andrea Righi
1 sibling, 1 reply; 19+ messages in thread
From: Tejun Heo @ 2026-12-04 17:27 UTC (permalink / raw)
To: Steven Rostedt
Cc: Andrea Righi, LKML, sched-ext, David Vernet, Changwoo Min,
Peter Zijlstra, Ingo Molnar, Thomas Gleixner, Linus Torvalds,
Jonathan Corbet, Greg Kroah-Hartman, Sasha Levin, Zicheng Qu
Hello,
On Fri, Dec 04, 2026 at 12:16:18PM -0500, Steven Rostedt wrote:
> Thanks, I added that, but that still requires me to pass it a message id,
> as I don't believe it can browse the list.
FWIW, this is what my agent does for email / lkml accesses:
https://github.com/htejun/kernel-agent-workflows/blob/main/mail/lore-thread.md
https://github.com/htejun/kernel-agent-workflows/blob/main/mail/setup.md
https://github.com/htejun/kernel-agent-workflows/blob/main/mailbox/inbox.md
The first one fetches threads with b4. The second has "lei q" for searching
lore without a message id, and the last one is for reading a local mailbox
instead. When lore serves the JS challenge to a web fetch, it falls back to
a headless browser which runs the challenge.
The headless browser is the distro's chromium driven by a small node
script, with puppeteer-core, puppeteer-extra and
puppeteer-extra-plugin-stealth installed from npm. The gist of it is:
const puppeteer = require("puppeteer-extra");
puppeteer.use(require("puppeteer-extra-plugin-stealth")());
(async () => {
const browser = await puppeteer.launch({
headless: "new",
executablePath: "/usr/bin/chromium",
});
const page = await browser.newPage();
await page.goto(process.argv[2], { waitUntil: "networkidle0" });
/* wait for the Anubis challenge page to go away */
await page.waitForFunction(() => !document.title.includes("not a bot"));
console.log(await page.evaluate(() => document.body.innerText));
await browser.close();
})();
That gets through to lore's search pages too, e.g.
https://lore.kernel.org/all/?q=s%3A%22stale+fair+load+weight%22, so the
agent can look for earlier discussions without a message id.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: [RANT][PATCH] sched_ext: Fix stale fair load weight after renice under SCX
2026-12-04 17:27 ` Tejun Heo
@ 2026-12-04 17:38 ` Sasha Levin
0 siblings, 0 replies; 19+ messages in thread
From: Sasha Levin @ 2026-12-04 17:38 UTC (permalink / raw)
To: Tejun Heo
Cc: Steven Rostedt, Andrea Righi, LKML, sched-ext, David Vernet,
Changwoo Min, Peter Zijlstra, Ingo Molnar, Thomas Gleixner,
Linus Torvalds, Jonathan Corbet, Greg Kroah-Hartman, Zicheng Qu
On Fri, Dec 04, 2026 at 07:27:31AM -1000, Tejun Heo wrote:
>Hello,
>
>On Fri, Dec 04, 2026 at 12:16:18PM -0500, Steven Rostedt wrote:
>> Thanks, I added that, but that still requires me to pass it a message id,
>> as I don't believe it can browse the list.
>
>FWIW, this is what my agent does for email / lkml accesses:
>
> https://github.com/htejun/kernel-agent-workflows/blob/main/mail/lore-thread.md
> https://github.com/htejun/kernel-agent-workflows/blob/main/mail/setup.md
> https://github.com/htejun/kernel-agent-workflows/blob/main/mailbox/inbox.md
>
>The first one fetches threads with b4. The second has "lei q" for searching
>lore without a message id, and the last one is for reading a local mailbox
>instead. When lore serves the JS challenge to a web fetch, it falls back to
>a headless browser which runs the challenge.
Any interest in adding some of this to
https://lore.kernel.org/all/20261111225940.1573565-1-tytso@mit.edu/? :)
Rik also sent me a link to a similar repo he has of his own skills, and it
sounds like a whole bunch of us have something like that too.`
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [RANT][PATCH] sched_ext: Fix stale fair load weight after renice under SCX
2026-12-04 17:16 ` Steven Rostedt
2026-12-04 17:27 ` Tejun Heo
@ 2026-12-04 17:29 ` Andrea Righi
2026-12-04 17:59 ` Steven Rostedt
1 sibling, 1 reply; 19+ messages in thread
From: Andrea Righi @ 2026-12-04 17:29 UTC (permalink / raw)
To: Steven Rostedt
Cc: LKML, sched-ext, Tejun Heo, David Vernet, Changwoo Min,
Peter Zijlstra, Ingo Molnar, Thomas Gleixner, Linus Torvalds,
Jonathan Corbet, Greg Kroah-Hartman, Sasha Levin, Zicheng Qu
On Fri, Dec 04, 2026 at 12:16:18PM -0500, Steven Rostedt wrote:
> On Fri, 4 Dec 2026 18:04:46 +0100
> Andrea Righi <arighi@nvidia.com> wrote:
>
> > On Fri, Dec 04, 2026 at 11:53:36AM -0500, Steven Rostedt wrote:
> > > On Fri, 4 Dec 2026 17:33:18 +0100
> > > Andrea Righi <arighi@nvidia.com> wrote:
> > >
> > > > Hehe, tell your junior AI engineer to check on the list for similar
> > > > fixes. That should work. :)
> > >
> > > It can't because lore blocks bots :-p
> >
> > Try the following skill.
>
> Thanks, I added that, but that still requires me to pass it a message id,
> as I don't believe it can browse the list.
If you have lei installed, the agent should be smart enough to use that
for the search/browse part. If not, just mention lei in the skill.
-Andrea
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [RANT][PATCH] sched_ext: Fix stale fair load weight after renice under SCX
2026-12-04 17:29 ` Andrea Righi
@ 2026-12-04 17:59 ` Steven Rostedt
0 siblings, 0 replies; 19+ messages in thread
From: Steven Rostedt @ 2026-12-04 17:59 UTC (permalink / raw)
To: Andrea Righi
Cc: LKML, sched-ext, Tejun Heo, David Vernet, Changwoo Min,
Peter Zijlstra, Ingo Molnar, Thomas Gleixner, Linus Torvalds,
Jonathan Corbet, Greg Kroah-Hartman, Sasha Levin, Zicheng Qu
On Fri, 4 Dec 2026 18:29:49 +0100
Andrea Righi <arighi@nvidia.com> wrote:
> > Thanks, I added that, but that still requires me to pass it a message id,
> > as I don't believe it can browse the list.
>
> If you have lei installed, the agent should be smart enough to use that
> for the search/browse part. If not, just mention lei in the skill.
Actually, I replied here before working back with Claude. It figured out by
itself how to browse the mailing lists without me adding any additional
skills.
It's proving to be a rather competent junior engineer.
-- Steve
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [RANT][PATCH] sched_ext: Fix stale fair load weight after renice under SCX
2026-12-04 17:04 ` Andrea Righi
2026-12-04 17:16 ` Steven Rostedt
@ 2026-12-04 17:36 ` Sasha Levin
1 sibling, 0 replies; 19+ messages in thread
From: Sasha Levin @ 2026-12-04 17:36 UTC (permalink / raw)
To: Andrea Righi
Cc: Steven Rostedt, LKML, sched-ext, Tejun Heo, David Vernet,
Changwoo Min, Peter Zijlstra, Ingo Molnar, Thomas Gleixner,
Linus Torvalds, Jonathan Corbet, Greg Kroah-Hartman, Zicheng Qu
On Fri, Dec 04, 2026 at 06:04:46PM +0100, Andrea Righi wrote:
>On Fri, Dec 04, 2026 at 11:53:36AM -0500, Steven Rostedt wrote:
>> On Fri, 4 Dec 2026 17:33:18 +0100
>> Andrea Righi <arighi@nvidia.com> wrote:
>>
>> > Hehe, tell your junior AI engineer to check on the list for similar
>> > fixes. That should work. :)
>>
>> It can't because lore blocks bots :-p
>
>Try the following skill.
>
>-Andrea
>
>---
>name: Use b4 for lore.kernel.org
>description: WebFetch fails on lore.kernel.org due to Anubis anti-bot - use b4 mbox instead
>type: feedback
>---
>
>Do not use WebFetch for lore.kernel.org URLs - they are blocked by Anubis anti-bot challenge.
>
>**Why:** lore.kernel.org uses Anubis JS challenge that blocks non-browser fetches.
>
>**How to apply:** Use `b4 mbox <message-id>` to download the mbox file, then analyze it locally.
>
>When reviewing a patch series, consider `b4 mbox -a <message-id>` to fetch older
>and newer revisions and save them in revision order. Comparing revisions and
>their discussions provides context about how the series evolved.
I have something similar, but it also points to "b4 dig" as well as lei :)
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [RANT][PATCH] sched_ext: Fix stale fair load weight after renice under SCX
2026-12-04 15:40 ` Andrea Righi
2026-12-04 15:44 ` Tejun Heo
2026-12-04 15:59 ` Steven Rostedt
@ 2026-12-04 16:19 ` Peter Zijlstra
2 siblings, 0 replies; 19+ messages in thread
From: Peter Zijlstra @ 2026-12-04 16:19 UTC (permalink / raw)
To: Andrea Righi
Cc: Steven Rostedt, LKML, sched-ext, Tejun Heo, David Vernet,
Changwoo Min, Ingo Molnar, Thomas Gleixner, Linus Torvalds,
Jonathan Corbet, Greg Kroah-Hartman, Sasha Levin, Zicheng Qu
On Fri, Dec 04, 2026 at 04:40:23PM +0100, Andrea Righi wrote:
> Peter, Zicheng, do you remember why that series did not land upstream?
> Was there any open issue to address, or did the series simply fall
> through the cracks?
Probably a combination of new versions being send as reply to the old
version (this is terrible) and me getting insane amounts of email and
just having missed things.
Let me go find it.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [RANT][PATCH] sched_ext: Fix stale fair load weight after renice under SCX
2026-12-04 14:35 [RANT][PATCH] sched_ext: Fix stale fair load weight after renice under SCX Steven Rostedt
2026-12-04 15:19 ` Tejun Heo
2026-12-04 15:40 ` Andrea Righi
@ 2026-12-04 18:06 ` Linus Torvalds
2026-12-04 18:47 ` Steven Rostedt
2 siblings, 1 reply; 19+ messages in thread
From: Linus Torvalds @ 2026-12-04 18:06 UTC (permalink / raw)
To: Steven Rostedt
Cc: LKML, sched-ext, Tejun Heo, David Vernet, Andrea Righi,
Changwoo Min, Peter Zijlstra, Ingo Molnar, Thomas Gleixner,
Jonathan Corbet, Greg Kroah-Hartman, Sasha Levin
On Fri, 4 Dec 2026 at 06:35, Steven Rostedt <rostedt@goodmis.org> wrote:
>
> I didn't write this patch. Putting my name on it is exactly the same as
> going to ChatGPT and having it create a picture and say that I drew it.
Not exactly. I think the real issue is: "who takes responsibility"
When you paint a picture, there's no "responsibility" involved. It is
what it is. It has no other function than being pretty, and there's no
"maintenance" of the end result.
That's very different with kernel patches.
When you send out a patch, I think the important part is not how you
generated it, but whether you take responsibility for it.
Maybe you generated it with claude. Maybe you used 'sed' or
'coccinelle'. Or maybe you craftyed it carefully by hand and it's an
all-natural and organic human-made patch. But regardless, it's your
work.
And yes, I can find patches from you that were generated with either
sed and coccinelle, and you verified the end result, and you sent them
out as you.
There was no 'Steven Rostedt (Coccinelle)' on those patches. You took
ownership of them, and responsibility for them.
And that's exactly how it should be.
Saying so in the commit message is obviously fine - particularly if
you don't necessarily know the code and cannot vouch for the patch as
much as if it was code you actually know intimately.
But I don't think you should try to foist off authorship on a tool.
Tool-assisted or not, you are the author, and you hopefully take
responsibility for the patches you send out (or commit directly).
[ Or - like I quite often do - maybe you generate patches that are
*not* meant to be actually applied, you then say "This is untested
garbage and I'm throwing it out as an idea in the hopes that somebody
else will take responsibility".
That's my way to explicitly *not* take responsiiility for a patch,
and make it clear that it's an idea, not a final polished product.
And that's also entirely independent of whether any tools were
involved: typically those patches of mine are all very much
hand-generated all-natural organic ones and did *not* go through any
tools that checked them for correctness. It would probably be better
if I did... ]
Linus
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: [RANT][PATCH] sched_ext: Fix stale fair load weight after renice under SCX
2026-12-04 18:06 ` Linus Torvalds
@ 2026-12-04 18:47 ` Steven Rostedt
2026-12-04 18:57 ` Linus Torvalds
0 siblings, 1 reply; 19+ messages in thread
From: Steven Rostedt @ 2026-12-04 18:47 UTC (permalink / raw)
To: Linus Torvalds
Cc: LKML, sched-ext, Tejun Heo, David Vernet, Andrea Righi,
Changwoo Min, Peter Zijlstra, Ingo Molnar, Thomas Gleixner,
Jonathan Corbet, Greg Kroah-Hartman, Sasha Levin
On Fri, 4 Dec 2026 10:06:07 -0800
Linus Torvalds <torvalds@linux-foundation.org> wrote:
> On Fri, 4 Dec 2026 at 06:35, Steven Rostedt <rostedt@goodmis.org> wrote:
> >
> > I didn't write this patch. Putting my name on it is exactly the same as
> > going to ChatGPT and having it create a picture and say that I drew it.
>
> Not exactly. I think the real issue is: "who takes responsibility"
But isn't that what the Signed-off-by is for? I've taken patches from
junior engineers before where they get the credit in the From (and
signed-off-by as well) but I have to add the Signed-off-by myself if I'm to
push it. That's exactly how I see this here. I'm taking responsibility and
sign off on it, but I still feel it's lying if the commit has:
Author: Steven Rostedt <rostedt@goodmis.org>
>
> When you paint a picture, there's no "responsibility" involved. It is
> what it is. It has no other function than being pretty, and there's no
> "maintenance" of the end result.
But Author is (to me anyway) about credit. I've even done major changes to
a patch someone submitted and kept their From line because I want them to
have credit for the original idea. I make sure the change log is very clear
on what changes I have done, so yes, the responsibility is still on me for
the changes I make.
>
> That's very different with kernel patches.
>
> When you send out a patch, I think the important part is not how you
> generated it, but whether you take responsibility for it.
>
> Maybe you generated it with claude. Maybe you used 'sed' or
> 'coccinelle'. Or maybe you craftyed it carefully by hand and it's an
> all-natural and organic human-made patch. But regardless, it's your
> work.
What made me see this as different than the few times I used Coccinelle was
how little work I did. My interactions were pretty much exactly like what I
do for an engineer I mentor. I simply told it do something and then I
reviewed the result.
With Coccinelle or even a sed script, I have to write the commands just
like I write code for. If I'm off a little, it screws up. I can't say, "Oh
Coccinelle, I didn't mean that, could you try this way instead?". No, when
the output from Coccinelle is wrong, I usually spend a few hours on how to
debug the script.
That is, Coccinelle and sed are just extensions of coding. I do not see AI
as the same. You do not need to be nearly exact with AI as you do when creating
a Coccinelle script. The work with Coccinelle and sed requires about the
same amount of skill as programming itself.
Also, Coccinelle and sed are both just pattern matching and replacing. It's
not saying "hey I found a bug, let me write it, let me test it, let me
create the change log with the test results".
That's a HUGE difference.
>
> And yes, I can find patches from you that were generated with either
> sed and coccinelle, and you verified the end result, and you sent them
> out as you.
>
> There was no 'Steven Rostedt (Coccinelle)' on those patches. You took
> ownership of them, and responsibility for them.
I would be happy to add that to give credit to Coccinelle ;-)
But it didn't bother me as much because of the amount of work I put in to
write the Coccinelle script. And even after running it, I still had to
check every location and even fix where it missed.
Yeah, I need to check AI too, but it's more likely to find more locations
that were missed then I would have.
>
> And that's exactly how it should be.
>
> Saying so in the commit message is obviously fine - particularly if
> you don't necessarily know the code and cannot vouch for the patch as
> much as if it was code you actually know intimately.
>
> But I don't think you should try to foist off authorship on a tool.
>
> Tool-assisted or not, you are the author, and you hopefully take
> responsibility for the patches you send out (or commit directly).
Yes, I 100% agree about responsibility of submissions and that's exactly
what I would do. What I take issue with, is the assumption that I did the
work. I honestly feel like I'm plagiarizing even if I give credit in the
change log.
When I submit it, I take 100% responsibility for it just like I do when I
submit a patch from someone I'm mentoring and add my Signed-off-by. I just
hate that it looks like I was the one with the talent to write the patch.
It really gives me a bad taste and I truly feel I'm doing something wrong.
It also doesn't help that I've been dealing with a lot of incoming patches
from people who are obviously not writing the code and just sending out
what their AI agents are creating.
I take pride in what I create, and I want it very much known (even in git
blame) what I created and what I took from somebody/something else.
-- Steve
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [RANT][PATCH] sched_ext: Fix stale fair load weight after renice under SCX
2026-12-04 18:47 ` Steven Rostedt
@ 2026-12-04 18:57 ` Linus Torvalds
2026-12-04 19:29 ` Steven Rostedt
0 siblings, 1 reply; 19+ messages in thread
From: Linus Torvalds @ 2026-12-04 18:57 UTC (permalink / raw)
To: Steven Rostedt
Cc: LKML, sched-ext, Tejun Heo, David Vernet, Andrea Righi,
Changwoo Min, Peter Zijlstra, Ingo Molnar, Thomas Gleixner,
Jonathan Corbet, Greg Kroah-Hartman, Sasha Levin
On Fri, 4 Dec 2026 at 10:47, Steven Rostedt <rostedt@goodmis.org> wrote:
>
> But isn't that what the Signed-off-by is for?
Yes - both legally and in a "if problems show up". But the first
author is special.
And tools are not authors. Not dumb ones, but not even smart ones.
Coccinelle isn't an author, and the fact that coccinelle is hard to
use is not an argument for why you - and not it - isn't the author.
Yes, claude is easier to use and a lot more powerful. But that doesn't
change a thing.
Linus
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: [RANT][PATCH] sched_ext: Fix stale fair load weight after renice under SCX
2026-12-04 18:57 ` Linus Torvalds
@ 2026-12-04 19:29 ` Steven Rostedt
0 siblings, 0 replies; 19+ messages in thread
From: Steven Rostedt @ 2026-12-04 19:29 UTC (permalink / raw)
To: Linus Torvalds
Cc: LKML, sched-ext, Tejun Heo, David Vernet, Andrea Righi,
Changwoo Min, Peter Zijlstra, Ingo Molnar, Thomas Gleixner,
Jonathan Corbet, Greg Kroah-Hartman, Sasha Levin
On Fri, 4 Dec 2026 10:57:12 -0800
Linus Torvalds <torvalds@linux-foundation.org> wrote:
> On Fri, 4 Dec 2026 at 10:47, Steven Rostedt <rostedt@goodmis.org> wrote:
> >
> > But isn't that what the Signed-off-by is for?
>
> Yes - both legally and in a "if problems show up". But the first
> author is special.
I don't understand how much special it is compared to the last
Signed-off-by. There's a lot of drive-by authors where if there's a problem
with the code, that ends up on the maintainer's lap and not the author,
because the author is nowhere to be found. AI is even making this more of
a problem.
>
> And tools are not authors. Not dumb ones, but not even smart ones.
>
> Coccinelle isn't an author, and the fact that coccinelle is hard to
> use is not an argument for why you - and not it - isn't the author.
I already stated I'd be happy to give the author credit to Coccinelle ;-)
>
> Yes, claude is easier to use and a lot more powerful. But that doesn't
> change a thing.
It wasn't just about ease of use, it was the fact that it did the actual
design. With Coccinelle and sed, you are still 100% in control. But with
AI, you just sit back and watch the token counter tick up to relax as it
does all the thinking for you. That is the main difference and I didn't
realize this until this patch was created. Very little thinking on my part
was involved.
It was how the AI found the bug, created a fix, found a reproducer and test
case for it, and posted the results. This isn't "ease of use", this is "Turn
me from engineer to manager" level of change. I've never used a tool that
was no different than helping out a human do the same thing.
One big difference between an AI tool and helping a human was the lack of
accomplishment I felt. I'm always very proud when I help mentor a new
developer that makes their first kernel patch. I did basically the same
work here, but without that satisfaction. In fact, I feel a bit dirty for
doing it. :-( That's because I wasted this effort on a bot and not an
actual human being.
Note, I'm not against using AI in this manner. Quite the opposite as I see
a lot of advantages for it. But I also see the danger of this being a brain
drain for up and coming programmers. A lot of my experiences come from
making my own mistakes and learning from them. AI will be making similar
mistakes, but will it learn. Will AI be able to mentor people?
Anyway, I still hate putting my name as author to something I obviously
didn't write, even if I'm willing to take full responsibility for it. In
the near future, we will not know who is a skilled programmer from who has
a good AI model. It may not make a difference in the project, but it
certainly makes a difference from who you want to learn from.
-- Steve
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2026-12-04 19:29 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04 14:35 [RANT][PATCH] sched_ext: Fix stale fair load weight after renice under SCX Steven Rostedt
2026-12-04 15:19 ` Tejun Heo
2026-12-04 15:40 ` Andrea Righi
2026-12-04 15:44 ` Tejun Heo
2026-12-04 15:59 ` Steven Rostedt
2026-12-04 16:33 ` Andrea Righi
2026-12-04 16:53 ` Steven Rostedt
2026-12-04 17:04 ` Andrea Righi
2026-12-04 17:16 ` Steven Rostedt
2026-12-04 17:27 ` Tejun Heo
2026-12-04 17:38 ` Sasha Levin
2026-12-04 17:29 ` Andrea Righi
2026-12-04 17:59 ` Steven Rostedt
2026-12-04 17:36 ` Sasha Levin
2026-12-04 16:19 ` Peter Zijlstra
2026-12-04 18:06 ` Linus Torvalds
2026-12-04 18:47 ` Steven Rostedt
2026-12-04 18:57 ` Linus Torvalds
2026-12-04 19:29 ` Steven Rostedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox