Re: [RFC PATCH v15 2/7] locking/mutex: Rework task_struct::blocked_on
From: John Stultz
Date: Wed Mar 19 2025 - 05:57:13 EST
On Tue, Mar 18, 2025 at 4:33 PM Lance Yang <ioworker0@xxxxxxxxx> wrote:
>
> When’s the next version expected? I intend to send a new version out
> soon, and it’d be great if you could include it in the next version ;)
Yeah, I've pulled in your old version already, but I'll update my tree
with your new one. Between conf travel and vacation, it might be
April before I get v16 out.
Most likely I'll be moving much of linux/hung_task.h into
linux/sched.h to get generic accessors to setting and clearing the
task blocked-on relationship (so its not just tied to the hung task
debug logic). Then for proxy I just need to integrate it with the
additional blocked_on_state that is used to determine if the
(previously blocked, but left on the rq) task is runnable or not.
> Also, since we have similar use cases, it might make sense to use
> the same field to store the lock, encoding the lock type in the LSB as
> Masami suggested.
Yep. Agreed. As I mentioned earlier, proxy only works with mutexes at
the moment, but I do intend to expand that once we have the core proxy
logic well tested upstream, so the multi-type blocked-on relationship
is really useful to have.
thanks!
-john