Re: [RESEND][PATCH v21 2/6] sched/locking: Add blocked_on_state to provide necessary tri-state for proxy return-migration
From: John Stultz
Date: Thu Sep 18 2025 - 19:07:59 EST
On Mon, Sep 15, 2025 at 2:05 AM K Prateek Nayak <kprateek.nayak@xxxxxxx> wrote:
> On 9/4/2025 5:51 AM, John Stultz wrote:
> > --- a/include/linux/sched.h
> > +++ b/include/linux/sched.h
> > @@ -815,6 +815,12 @@ struct kmap_ctrl {
> > #endif
> > };
> >
> > +enum blocked_on_state {
> > + BO_RUNNABLE,
> > + BO_BLOCKED,
> > + BO_WAKING,
> > +};
> > +
> > struct task_struct {
> > #ifdef CONFIG_THREAD_INFO_IN_TASK
> > /*
> > @@ -1234,6 +1240,7 @@ struct task_struct {
> > struct rt_mutex_waiter *pi_blocked_on;
> > #endif
> >
> > + enum blocked_on_state blocked_on_state;
>
> Is there any use of the "blocked_on_state" outside of CONFIG_PROXY_EXEC?
> If not, should we start thinking about putting the proxy exec specific
> members behind CONFIG_PROXY_EXEC to avoid bloating the task_struct?
So yeah, your suggestion is a decent one, though it gets a little
messy in a few spots. I'm working on integrating this and propagating
it through the full series, and hopefully I can clean it up further.
There are a few spots where this and other proxy related values do get
checked, so wrapping those up so they can be ifdef'ed out will require
some extra logic.
Thanks for the review and suggestion!
-john