All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Kuba Piecuch <jpiecuch@google.com>
Cc: tj@kernel.org, stable@vger.kernel.org
Subject: Re: FAILED: patch "[PATCH] sched_ext: Skip ops.set_weight() for disabled tasks" failed to apply to 7.1-stable tree
Date: Tue, 21 Jul 2026 16:19:53 +0200	[thread overview]
Message-ID: <2026072139-phrasing-scroll-e4fa@gregkh> (raw)
In-Reply-To: <2026072141-spotless-tarantula-5421@gregkh>

On Tue, Jul 21, 2026 at 04:19:02PM +0200, Greg KH wrote:
> On Tue, Jul 21, 2026 at 01:47:04PM +0000, Kuba Piecuch wrote:
> > Hi Greg,
> > 
> > I'm unable to reproduce the failure using the steps provided.
> > The patch applies cleanly. The code compiles and tests are passing.
> > 
> > FWIW, below is the patch after cherry-picking the commit:
> > 
> > Thanks,
> > Kuba
> > 
> > ------------------------ 8< ----------------------------
> > 
> > >From adc748e669cc1564255430299abf086b9ecd9b45 Mon Sep 17 00:00:00 2001
> > From: Kuba Piecuch <jpiecuch@google.com>
> > Date: Fri, 10 Jul 2026 14:43:41 +0000
> > Subject: [PATCH] sched_ext: Skip ops.set_weight() for disabled tasks
> > 
> > When switching a task's sched_class away from sched_ext, we get the
> > following sequence of events in __sched_setscheduler():
> > 
> > sched_change_begin()
> >   switched_from_scx()
> >     scx_disable_task(p)
> >       ops.disable(p)
> > __setscheduler_params()
> >   set_load_weight()
> >     reweight_task_scx(p)
> >       ops.set_weight(p)
> > p->sched_class = next_class;
> > sched_change_end()
> >   ...
> > 
> > Notably, ops.set_weight() is called _after_ ops.disable().
> > This violates the expected semantics of the callbacks, the expectation
> > being that ops.disable() can only be followed by ops.exit_task() or
> > ops.enable().
> > 
> > Skipping the weight adjustment for disabled tasks should be harmless
> > since the weight will be recalculated in scx_enable_task() if the task
> > ever rejoins SCX.
> > 
> > Fixes: 637b0682821b ("sched: Fold sched_class::switch{ing,ed}_{to,from}() into the change pattern")
> > Cc: stable@vger.kernel.org # v6.19+
> > Signed-off-by: Kuba Piecuch <jpiecuch@google.com>
> > Signed-off-by: Tejun Heo <tj@kernel.org>
> > (cherry picked from commit 0e2f4ab68a89fad42e0f5a9ff4b740738e7aa1d6)
> > ---
> >  kernel/sched/ext.c | 11 +++++++++++
> 
> If you look, the original file was:
> 	kernel/sched/ext/ext.c
> your cherry-pick fixed that.
> 
> I'll take this, thanks.

Nope, the whitespace is corrupted, please send a good copy.

thanks,

greg k-h

  reply	other threads:[~2026-07-21 14:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-21  9:17 FAILED: patch "[PATCH] sched_ext: Skip ops.set_weight() for disabled tasks" failed to apply to 7.1-stable tree gregkh
2026-07-21 13:47 ` Kuba Piecuch
2026-07-21 14:19   ` Greg KH
2026-07-21 14:19     ` Greg KH [this message]
2026-07-21 15:04       ` [PATCH 7.1.y] sched_ext: Skip ops.set_weight() for disabled tasks Kuba Piecuch
2026-07-22  0:53         ` Sasha Levin

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=2026072139-phrasing-scroll-e4fa@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=jpiecuch@google.com \
    --cc=stable@vger.kernel.org \
    --cc=tj@kernel.org \
    /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.