Re: [PATCH 1/3] SCHEDULER: Add an interface for counting real utilization.

From: Peter Zijlstra
Date: Thu Sep 28 2023 - 04:02:32 EST


On Thu, Sep 28, 2023 at 10:22:26AM +0800, Xiaobing Li wrote:
> + for (int i = 0; i < MAX_SQ_NUM; i++) {
> + if (sqstat[i] && (task_cpu(sqstat[i]) != task_cpu(p)
> + || sqstat[i]->__state == TASK_DEAD))
> + sqstat[i] = NULL;
> + }

This coding style is horrific, please don't ever use that again.