Re: [PATCH v2] freezer, sched: report the frozen task stat as 'D'
From: Tejun Heo
Date: Fri Dec 13 2024 - 11:43:12 EST
On Fri, Dec 13, 2024 at 11:03:32AM +0000, Chen Ridong wrote:
...
> diff --git a/include/linux/sched.h b/include/linux/sched.h
> index d380bffee2ef..dbe0cb97461f 100644
> --- a/include/linux/sched.h
> +++ b/include/linux/sched.h
> @@ -1630,8 +1630,9 @@ static inline unsigned int __task_state_index(unsigned int tsk_state,
> * We're lying here, but rather than expose a completely new task state
> * to userspace, we can make this appear as if the task has gone through
> * a regular rt_mutex_lock() call.
> + * Report the frozen task uninterruptible.
> */
> - if (tsk_state & TASK_RTLOCK_WAIT)
> + if (tsk_state & TASK_RTLOCK_WAIT || tsk_state & TASK_FROZEN)
Can you please add ()'s so that it's if ((a & b) || (c & d))? Other than
that,
Acked-by: Tejun Heo <tj@xxxxxxxxxx>
Thanks.
--
tejun