public inbox for sched-ext@lists.linux.dev
 help / color / mirror / Atom feed
From: Andrea Righi <arighi@nvidia.com>
To: Cheng-Yang Chou <yphbchou0911@gmail.com>
Cc: sched-ext@lists.linux.dev, Tejun Heo <tj@kernel.org>,
	David Vernet <void@manifault.com>,
	Changwoo Min <changwoo@igalia.com>,
	Ching-Chun Huang <jserv@ccns.ncku.edu.tw>,
	Chia-Ping Tsai <chia7712@gmail.com>
Subject: Re: [PATCH] tools/sched_ext: Fix off-by-one in scx_sdt payload zeroing
Date: Tue, 31 Mar 2026 11:42:39 +0200	[thread overview]
Message-ID: <acuXD7AVGnnLAMn2@gpd4> (raw)
In-Reply-To: <wyp2r4ac6ddkiubgjm33nesl3hmovqrlcvfkstcuvqgtvzgryx@yd44lc6xdhn2>

Hi Cheng-Yang,

On Tue, Mar 31, 2026 at 05:24:35PM +0800, Cheng-Yang Chou wrote:
> On Tue, Mar 31, 2026 at 05:18:33PM +0800, Cheng-Yang Chou wrote:
> > Test plan:
> > - Add a temporary sanity check in scx_task_free() before the free call:
> > 
> >   if (mval->data->tid.idx != mval->tid.idx)
> >       scx_bpf_error("tid corruption: arena=%d storage=%d",
> >                     mval->data->tid.idx, (int)mval->tid.idx);
> > 
> > - stress-ng --fork 100 -t 10 & sudo ./build/bin/scx_sdt
> > 
> 
> While testing in virtme-ng, I encountered a bug (see below).
> IIRC, Andrea sent a patch to fix this.
> Has the patch landed yet, or is it perhaps in a different tree?
> 
> $ vng -m 2G -v --rw
> $ stress-ng --fork 100 -t 10 & sudo ./build/bin/scx_sdt
> [  111.268570] irq event stamp: 24073
> [  111.268577] hardirqs last  enabled at (24073): [<ffffffff98dcc597>] _raw_spin_unlock_irqrestore+0x57/0x80
> [  111.268654] =============================
> [  111.268655] [ BUG: Invalid wait context ]
> [  111.268732] hardirqs last disabled at (24072): [<ffffffff98dcc277>] _raw_spin_lock_irqsave+0x57/0x60
> [  111.268882] 7.0.0-rc2-g94555ca6d0bb #8 Not tainted
> [  111.268952] softirqs last  enabled at (24060): [<ffffffff957da30c>] fpu_clone+0xdc/0x520
> [  111.269016] -----------------------------
> [  111.269180] softirqs last disabled at (24058): [<ffffffff957da2b4>] fpu_clone+0x84/0x520
> [  111.269282] stress-ng-fork/703 is trying to lock:
> [  111.269762] ffffffff9aa64650 (rcu_tasks_trace_srcu_struct_srcu_usage.lock){....}-{3:3}, at: spin_lock_irqsave_sdp_contention+0x107/0x260

Yes, landed upstream, you need these:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=175b45ed343a9c547b5f45293d3ea08d38a7b6f4
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=61bbcfb50514a8a94e035a7349697a3790ab4783
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7c405fb3279b39244b260b54f1bd6488689ae235

-Andrea

  reply	other threads:[~2026-03-31  9:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-31  9:18 [PATCH] tools/sched_ext: Fix off-by-one in scx_sdt payload zeroing Cheng-Yang Chou
2026-03-31  9:24 ` Cheng-Yang Chou
2026-03-31  9:42   ` Andrea Righi [this message]
2026-03-31 10:58     ` Cheng-Yang Chou
2026-04-04  6:14 ` Cheng-Yang Chou
2026-04-04 16:40   ` Emil Tsalapatis
2026-04-06 18:09 ` Tejun Heo

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=acuXD7AVGnnLAMn2@gpd4 \
    --to=arighi@nvidia.com \
    --cc=changwoo@igalia.com \
    --cc=chia7712@gmail.com \
    --cc=jserv@ccns.ncku.edu.tw \
    --cc=sched-ext@lists.linux.dev \
    --cc=tj@kernel.org \
    --cc=void@manifault.com \
    --cc=yphbchou0911@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