public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: John Stultz <jstultz@google.com>
Cc: K Prateek Nayak <kprateek.nayak@amd.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Vineeth Pillai <vineethrp@google.com>,
	Sonam Sanju <sonam.sanju@intel.com>,
	Sean Christopherson <seanjc@google.com>,
	Kunwu Chan <kunwu.chan@linux.dev>, Tejun Heo <tj@kernel.org>,
	Joel Fernandes <joelagnelf@nvidia.com>,
	Qais Yousef <qyousef@layalina.io>, Ingo Molnar <mingo@redhat.com>,
	Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Valentin Schneider <vschneid@redhat.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Will Deacon <will@kernel.org>, Waiman Long <longman@redhat.com>,
	Boqun Feng <boqun.feng@gmail.com>,
	"Paul E. McKenney" <paulmck@kernel.org>,
	Metin Kaya <Metin.Kaya@arm.com>,
	Xuewen Yan <xuewen.yan94@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Suleiman Souhlal <suleiman@google.com>,
	kuyo chang <kuyo.chang@mediatek.com>, hupu <hupu.gm@gmail.com>,
	kernel-team@android.com
Subject: Re: [PATCH v2 1/2] sched: proxy-exec: Close race causing workqueue work being delayed
Date: Wed, 6 May 2026 11:53:43 +0200	[thread overview]
Message-ID: <20260506095343.GO1026330@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <CANDhNCqxY4PpL=zkxB7e2k9mR99C4P-o63db40TFwqUp6ork7Q@mail.gmail.com>

On Tue, May 05, 2026 at 08:58:38PM -0700, John Stultz wrote:
> On Mon, May 4, 2026 at 9:37 PM K Prateek Nayak <kprateek.nayak@amd.com> wrote:
> > On 5/5/2026 9:02 AM, John Stultz wrote:
> > > but I'm not sure this is what Peter is looking for.
> >
> > Well this was just an option in case we don't want to backport super
> > invasive changes.
> >
> > That said, we can easily do the following on top to fit what Peter
> > originally suggested (although it'll probably require a bit effort to
> > integrate with the sleeping owner bits):
> >
> ...
> >
> > Attached is full diff as proxy.diff on top of tip:sched/core for
> > convenience. I'll let Peter comment further if he likes this
> > approach or not :-)
> 
> Thanks again for sharing this!
> 
> So, I believe I've now got my full stack working ontop of your
> proxy.diff file here (though as you pointed out there may be some
> dragons left in the sleeping owner patch, but I *think* its ok).
> 
> That said, I'm still not confident Peter won't still want his approach
> (since it seems he's scheming to use is_blocked for se.sched_delayed
> as well. That and I'm a bit shy after sinking so much time into the
> last approach he didn't like :), so I've *also* worked up my full
> series with Peter's approach (his change slots in after we get the
> ttwu return migration in place).

Sorry ;-)

> So I'm totally fine if Peter agrees to take your version as a near
> term fix for 7.1-rc.  But if he'd rather not, I'll try to move forward
> with his approach combined with the next chunk of patches.
> 
> That said, trying to keep this full jenga tower of patches ontop of
> both sides of your dualing banjos here is non-trivial, and I also do
> need to get a solution for devices using the full stack on 6.18 and
> 6.12 android trees very soon, which I'd like to keep closely aligned
> with upstream.
> 
> So having a clear direction to go forward would be helpful. :)
> 
> Peter: Do you have guidance here?

So yeah, I think you were feeling me right, I wanted to very much be
able to use that is_blocked for sched_delayed too -- its always bothered
me a little something to have to use se.sched_delayed in the core code.

That said, I think Prateek agrees that once we get return migration into
ttwu(), this all becomes simpler. And I think his insight that we can
use is_blocked && !blocked_on to replace PROXY_WAKING is still valid on
top of all that.

Given this is all still very much an 'under construction' area, I don't
think we need to rush fixes now. We can just slap 'BROKEN' on things and
continue merging things for the next cycle.



  reply	other threads:[~2026-05-06  9:59 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-30 21:50 [PATCH v2 0/2] Proxy Execution fixes for v7.1-rc John Stultz
2026-04-30 21:50 ` [PATCH v2 1/2] sched: proxy-exec: Close race causing workqueue work being delayed John Stultz
2026-04-30 23:53   ` John Stultz
2026-05-01  6:39   ` K Prateek Nayak
2026-05-01  7:11     ` John Stultz
2026-05-01 13:21   ` Peter Zijlstra
2026-05-01 15:55     ` K Prateek Nayak
2026-05-01 18:59       ` Peter Zijlstra
2026-05-01 22:26         ` John Stultz
2026-05-03 18:42           ` K Prateek Nayak
2026-05-04  5:37             ` K Prateek Nayak
2026-05-05  3:32               ` John Stultz
2026-05-05  4:37                 ` K Prateek Nayak
2026-05-06  3:58                   ` John Stultz
2026-05-06  9:53                     ` Peter Zijlstra [this message]
2026-05-06 10:39                       ` K Prateek Nayak
2026-05-04 21:33             ` John Stultz
2026-04-30 21:50 ` [PATCH v2 2/2] locking: mutex: Fix proxy-exec potentially deactivating tasks marked TASK_RUNNING John Stultz
2026-05-01  6:57   ` K Prateek Nayak
2026-05-04 22:30   ` kernel test robot

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=20260506095343.GO1026330@noisy.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=Metin.Kaya@arm.com \
    --cc=boqun.feng@gmail.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=dietmar.eggemann@arm.com \
    --cc=hupu.gm@gmail.com \
    --cc=joelagnelf@nvidia.com \
    --cc=jstultz@google.com \
    --cc=juri.lelli@redhat.com \
    --cc=kernel-team@android.com \
    --cc=kprateek.nayak@amd.com \
    --cc=kunwu.chan@linux.dev \
    --cc=kuyo.chang@mediatek.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=mingo@redhat.com \
    --cc=paulmck@kernel.org \
    --cc=qyousef@layalina.io \
    --cc=rostedt@goodmis.org \
    --cc=seanjc@google.com \
    --cc=sonam.sanju@intel.com \
    --cc=suleiman@google.com \
    --cc=tglx@linutronix.de \
    --cc=tj@kernel.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vineethrp@google.com \
    --cc=vschneid@redhat.com \
    --cc=will@kernel.org \
    --cc=xuewen.yan94@gmail.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