Re: [PATCH 2/2] sched/core: Uncookied force idle accounting per cpu

From: cruzzhao
Date: Thu Jan 06 2022 - 07:05:12 EST



在 2022/1/6 上午4:59, Josh Don 写道:

It's a good idea to combine them into a single sum. I separated them in
order to be consistent with the task accounting and for easy to understand.
As for change the task accounting, I've tried but I haven't found a
proper method to do so. I've considered the following methods:
1. Account the uncookie'd force idle time to the uncookie'd task, but
it'll be hard to trace the uncookie'd task.
2. Account the uncookie'd force idle time to the cookie'd task in the
core_tree of the core, but it will cost a lot on traversing the core_tree.

Many thanks for suggestions.
Best,
Cruz Zhao

> Why do you need this separated out into two fields then? Could we just
> combine the uncookie'd and cookie'd forced idle into a single sum?
>
> IMO it is fine to account the forced idle from uncookie'd tasks, but
> we should then also change the task accounting to do the same, for
> consistency.