From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: John Stultz <jstultz@google.com>
Cc: peterz@infradead.org, mingo@redhat.com, juri.lelli@redhat.com,
vincent.guittot@linaro.org, linux-kernel@vger.kernel.org,
dietmar.eggemann@arm.com, rostedt@goodmis.org,
bsegall@google.com, mgorman@suse.de, vschneid@redhat.com,
kprateek.nayak@amd.com, connoro@google.com, arighi@nvidia.com,
akpm@linux-foundation.org, shuah@kernel.org,
linux-kselftest@vger.kernel.org
Subject: Re: [RFC PATCH v1 0/8] sched/proxy: fixes for proxy execution, with selftests
Date: Tue, 17 Nov 2026 08:16:05 -0500 [thread overview]
Message-ID: <fda5e270-2a76-4752-a845-94815992d14b@efficios.com> (raw)
In-Reply-To: <CANDhNCruzSQ3r3WKPz9J6J5-DEm+L4hC8g6PvnuYnx9SiBTKhA@mail.gmail.com>
Hi John,
Thanks for running the tests on your tree. I answered on patches 1, 2,
4 and 5. The rest is below.
On 2026-11-17 01:28, John Stultz wrote:
>> 3 Stop the chain walk when the blocked_on chain is a cycle, so that a
>> mutex deadlock no longer locks up the CPU.
>
> Already have a fix for this.
deadlock_cycle (case 8) passes on your tree, so please drop mine.
>> 6 Check and admit a proxy-migrated deadline task in its own root
>> domain, so that sched_setattr() no longer fails with EPERM.
>
> This one I couldn't take as it was dependent on your other series.
Only one line of it depends on that series. On tip, that line becomes
task_home_cpu(p) in place of task_cpu(p) in sched_dl_overflow(). I can
post patch 6 on tip if you want to take it.
> Basically after the first two patches tests 6, and 7 continue to fail.
> Interestingly, 7 does pass with proxy-exec off, so I need to look
> closer to understand what is happening in that case that isn't
> dependent on your other DL patch series.
Case 7 is what patch 6 fixes. Its sched_setattr() checks the root
domain of the CPU the waiter was proxy-migrated to. That is the root
domain of the mutex owner, not the waiter's own.
You also see case 6 fail with proxy execution off. It fails the same
way on tip, so it is not a proxy execution bug. The waiter changes its
parameters and then leaves SCHED_DEADLINE while it is blocked. Its
bandwidth stays counted in its root domain:
# total_bw A: before 52428, at 300ms 262143, after 262143
My deadline series fixes this. With it, the case passes with proxy
execution off.
I also ran the selftest on your public proxy-exec-v33-7.4-pre-rc1
branch, with the test module added. The results match yours, except
for case 5: Yu-Ting's fix is not on that branch.
>> - Patch 3 also stops the donation on a ww_mutex cycle that the wound or
>> die path is about to break. The donor then sleeps on its mutex.
>
> Is this a concern or did you verify this occurs? I thought we
> wound/kill tasks before the cycle gets created (see
> __mutex_lock_common(), before we call set_task_blocked_on()). Maybe
> I'm forgetting something?
You are right, and it was not verified. I wrote it from reading, and
my was wrong. A task that wounds or kills another first clears
the blocked_on of that task. The victim sets its blocked_on again under
the wait_lock of its mutex. It then sees that it must back off, and
clears blocked_on before it drops that lock. The chain walk takes the
same lock before it follows the victim. So the walk never sees the
cycle. Please ignore that point.
Thanks,
Mathieu
--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com
prev parent reply other threads:[~2026-11-17 13:16 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 19:26 Mathieu Desnoyers
2026-11-16 19:26 ` [RFC PATCH v1 1/8] sched/proxy: Reschedule when a blocked task is woken under a proxy Mathieu Desnoyers
2026-11-16 21:12 ` John Stultz
2026-11-17 13:18 ` Mathieu Desnoyers
2026-11-16 19:26 ` [RFC PATCH v1 2/8] sched/proxy: Wake blocked RT and deadline tasks through the full path Mathieu Desnoyers
2026-11-16 21:35 ` John Stultz
2026-11-17 13:19 ` Mathieu Desnoyers
2026-11-16 19:26 ` [RFC PATCH v1 3/8] sched/proxy: Stop the chain walk when the blocked_on chain is a cycle Mathieu Desnoyers
2026-11-16 20:36 ` John Stultz
2026-11-16 19:26 ` [RFC PATCH v1 4/8] sched/proxy: Tell the class about a proxy migration Mathieu Desnoyers
2026-11-16 20:42 ` John Stultz
2026-11-17 13:20 ` Mathieu Desnoyers
2026-11-16 19:26 ` [RFC PATCH v1 5/8] sched/proxy: Clear blocked_donor when the donor stops donating Mathieu Desnoyers
2026-11-16 23:16 ` John Stultz
2026-11-17 13:22 ` Mathieu Desnoyers
2026-11-16 19:26 ` [RFC PATCH v1 6/8] sched/deadline: Use the root domain a proxy-migrated task runs in Mathieu Desnoyers
2026-11-16 19:26 ` [RFC PATCH v1 7/8] lib: Add test_proxy_exec, kernel mutexes that user space can hold Mathieu Desnoyers
2026-11-16 19:26 ` [RFC PATCH v1 8/8] selftests/sched: Add tests of proxy execution Mathieu Desnoyers
2026-11-16 20:27 ` [RFC PATCH v1 0/8] sched/proxy: fixes for proxy execution, with selftests John Stultz
2026-11-17 6:28 ` John Stultz
2026-11-17 13:16 ` Mathieu Desnoyers [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=fda5e270-2a76-4752-a845-94815992d14b@efficios.com \
--to=mathieu.desnoyers@efficios.com \
--cc=akpm@linux-foundation.org \
--cc=arighi@nvidia.com \
--cc=bsegall@google.com \
--cc=connoro@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=jstultz@google.com \
--cc=juri.lelli@redhat.com \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=shuah@kernel.org \
--cc=vincent.guittot@linaro.org \
--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
all inboxes | Powered by JetHome®