Re: [PATCH v2] sched/proxy_exec: Break cyclic proxy chains by deactivating blocked tasks

From: Xiaomi

Date: Wed Jul 15 2026 - 04:50:41 EST


> Btw, I realized you'll need to reset this marker on migration, else
> there is a rare chance of a stale p->blocked_donor pick_seq from an old
> pick CPU colliding with the pick_seq after migration.

Good catch. I think v3 should clear the marker when we migrate the task,
so the pick state is only meaningful for a single walk on a single CPU.
That avoids stale state from an old CPU colliding with a later walk.

> You can make this fit as per your v3 scheme.

I’m leaning toward keeping this proxy-local instead of putting it in a
generic CPU switch helper.

> Ack! I think eventually, blocked_on becomes a struct with a lock_type
> enum + void* pointer which allows for interpreting the pointer based
> on the lock_type.

Makes sense, and that’s another reason I’d keep the walk marker separate
from the blocked_on / blocked_donor representation itself.

> I agree p->blocked_donor has other uses with the extended series so it
> is best to use a separate variable to track the seq_count if we go down
> that route.

Right, that was my thinking as well.