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 5/8] sched/proxy: Clear blocked_donor when the donor stops donating
Date: Tue, 17 Nov 2026 08:22:24 -0500 [thread overview]
Message-ID: <710de08f-09e3-4dea-a5e2-6c2c55522161@efficios.com> (raw)
In-Reply-To: <CANDhNCoQteppE0ERWyz2LJ4PBLBKQymmzzbKwrxMwv1sAL4VPw@mail.gmail.com>
On 2026-11-16 18:16, John Stultz wrote:
> That said, Its not immediately obvious to me why clearing on
> move_queued_task() is needed? Mostly because: why would a proxy
> blocked task be migrated before wakeup? If a proxy-blocked task were
> migrated away, __schedule() would just proxy migrate it back to the
> current lock owner's rq.
Another task can move it. For example, sched_setaffinity() on the
donor: affine_move_task() calls move_queued_task() for a task that is
queued and not running. The donor is then queued on another runqueue.
If it is woken there, the clear at wake-up runs on that runqueue. It
does not see the owner. The owner still runs on the old CPU, with
blocked_donor pointing at the donor. Your proxy_needs_return()
clear has the same limit. The proxy migration back that you describe
only happens if the new CPU picks the donor before it is woken.
> as you mentioned there's no test case in your test for this logic.
Right. It was found by reading, and I did not try to reproduce it. The
owner would have to stay in the kernel without scheduling while the
donor exits and is freed.
Thanks,
Mathieu
--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com
next prev parent reply other threads:[~2026-11-17 13:22 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 19:26 [RFC PATCH v1 0/8] sched/proxy: fixes for proxy execution, with selftests 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 [this message]
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
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=710de08f-09e3-4dea-a5e2-6c2c55522161@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®