Linux s390 Architecture development
 help / color / mirror / Atom feed
From: Vasily Gorbik <gor@linux.ibm.com>
To: John Stultz <jstultz@google.com>
Cc: Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	K Prateek Nayak <kprateek.nayak@amd.com>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
	Valentin Schneider <vschneid@redhat.com>,
	Vineeth Pillai <vineethrp@google.com>,
	Joel Fernandes <joelagnelf@nvidia.com>,
	Heiko Carstens <hca@linux.ibm.com>,
	linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 0/2] sched/core: Fix proxy-exec/core-sched interactions
Date: Fri, 15 May 2026 18:38:24 +0200	[thread overview]
Message-ID: <ttf37k0@ub.hpns> (raw)
In-Reply-To: <CANDhNCrw9mNzj4adr8e-X-hA-PceTmDxNS6hvgSw+z0Xt9sKxA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2507 bytes --]

On Tue, May 12, 2026 at 05:48:19PM -0700, John Stultz wrote:
> On Tue, May 12, 2026 at 2:17 PM John Stultz <jstultz@google.com> wrote:
> > On Thu, May 7, 2026 at 3:42 AM Vasily Gorbik <gor@linux.ibm.com> wrote:
> > > The v1 reported the issue reproduced on s390 LPAR, but it seems to be
> > > easily reproducible with strace test suite "make -j$(nproc) check" on
> > > any system with SMT, CONFIG_SCHED_CORE=y and CONFIG_SCHED_PROXY_EXEC=y
> > > enabled, e.g. on x86 KVM with -smp cpus=16,sockets=1,cores=8,threads=2:
> > >
> > I really appreciate this reproducer detail, but I've so far not been
> > able to trip this issue up (SCHED_CORE=y, SCHED_PROXY_EXEC=y and using
> > the qemu arguments you included above). Could you mail me your .config
> > in case something else is needed?
> 
> Ok, I think I was able to force it using my priority-inversion-demo by
> taking the spots in the run.sh script where we kick off the
> rename-test and prefixing it with `coresched new -t pid --`
>   https://github.com/johnstultz-work/priority-inversion-demo/blob/main/run.sh#L89
> 
> That way the foreground/background tasks run with separate cookies and
> that forces proxying across cookies, and with that I've tripped over
> the issues you highlight.
> 
> That said, I'm still curious to learn more about your x86 environment
> and why it tripped so much more easily there, so let me know.

I retried the repro on commit 66182ca873a4 (yesterday's Linus master)
with the same "make -j$(nproc) check".
The claim of "easily reproducible" on x86 KVM with
-smp cpus=16,sockets=1,cores=8,threads=2 and "JUST" CONFIG_SCHED_CORE=y and
CONFIG_SCHED_PROXY_EXEC=y was an overstatement for x86.

But it triggers with at least 50% probability in KVM on my machine with the
config attached. I don't have any large x86 machine available to me,
so my setup is a laptop with an i7-1360P, Fedora 43 on host and guest,
plus the latest strace git.

Compared with the x86 defconfig + CONFIG_SCHED_CORE=y and
CONFIG_SCHED_PROXY_EXEC=y, my best guess is that PREEMPT=y and
PROVE_LOCKING=y might cause the issue to trigger more often.

With just
CONFIG_SCHED_CORE=y
CONFIG_SCHED_PROXY_EXEC=y
PREEMPT=y
I got only 2/10 repro success rate.

On s390 with 64 SMT-2 cores I've just triggered the problem 3/3 even with
arch/s390/configs/defconfig, which has:
CONFIG_PREEMPT_LAZY=y
CONFIG_SCHED_CORE=y
CONFIG_SCHED_PROXY_EXEC=y
and no debug options. I wouldn't expect anything particularly special
about s390, it's just the number of cores.

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 35270 bytes --]

      reply	other threads:[~2026-05-15 16:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-07 10:41 [PATCH v2 0/2] sched/core: Fix proxy-exec/core-sched interactions Vasily Gorbik
2026-05-07 10:41 ` [PATCH v2 1/2] sched/core: Don't steal a proxy-exec donor Vasily Gorbik
2026-05-12 21:35   ` John Stultz
2026-05-07 10:41 ` [PATCH v2 2/2] sched/core: Don't proxy-exec unmatched cookie lock owners Vasily Gorbik
2026-05-12 22:16   ` John Stultz
2026-05-14  9:54     ` K Prateek Nayak
2026-05-12 21:17 ` [PATCH v2 0/2] sched/core: Fix proxy-exec/core-sched interactions John Stultz
2026-05-13  0:48   ` John Stultz
2026-05-15 16:38     ` Vasily Gorbik [this message]

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=ttf37k0@ub.hpns \
    --to=gor@linux.ibm.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=hca@linux.ibm.com \
    --cc=joelagnelf@nvidia.com \
    --cc=jstultz@google.com \
    --cc=juri.lelli@redhat.com \
    --cc=kprateek.nayak@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vineethrp@google.com \
    --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