Re: [PATCH v26 00/10] Simple Donor Migration for Proxy Execution
From: K Prateek Nayak
Date: Sun Apr 05 2026 - 22:41:19 EST
Hello John,
On 4/4/2026 11:37 AM, John Stultz wrote:
>> Also looking at proxy-exec-v27-WIP, I think that:
>>
>> set_task_blocked_on_waking(p, NULL)
>>
>> in try_to_wake_up() can be moved after ttwu_state_match() since
>> otherwise, we skip waking the task but ttwu() will end up marking
>> it PROXY_WAKING for a spurious wakeup.
>>
>> I don't think there is any harm in keeping it that way but during the
>> next pick, __schedule() will end up seeing PROXY_WAKING and will block
>> the task.
>>
>> Until it receives a genuine wakeup, it cannot participate in proxy which
>> is a missed opportunity.
>
> So, actually, that caught my eye as well, and I think it can be
> dropped completely. I just didn't have the time to experiment and
> respin the series when I noticed it.
>
> My thinking:
> 1) Since including your recent suggestions, proxy_needs_return()
> handles both cases where its blocked_on a mutex or PROXY_WAKING.
> 2) If its not on the runqueue, we'll clear blocked_on anyway after
> setting TASK_WAKING
>
> So it seems like its harmless, but also unnecessary. I'll make sure
> next week and will drop it in the next revision.
Ack! I just thought you wanted to keep a clean:
blocked_on: NULL -> MUTEX -> PROXY_WAKING -> NULL
transition in all cases ;-)
--
Thanks and Regards,
Prateek