2021-12-23 12:30:35

by Cruz Zhao

[permalink] [raw]
Subject: [PATCH 0/2] Forced idle time accounting per cpu

Josh Don's patch 4feee7d12603 ("sched/core: Forced idle accounting")
provides one means to measure the cost of enabling core scheduling
from the perspective of the task, and this patchset provides another
means to do that from the perspective of the cpu.

Forced idle can be divided into two types, forced idle with cookie'd task
running on it SMT sibling, and forced idle with uncookie'd task running
on it SMT sibling, which should be accounting to measure the cost of
enabling core scheduling too. This patchset accounts both and the sum
of both, which are displayed via /proc/stat.

Cruz Zhao (2):
sched/core: Cookied forceidle accounting per cpu
sched/core: Uncookied force idle accounting per cpu

fs/proc/stat.c | 26 ++++++++++++++++++++++++++
include/linux/kernel_stat.h | 4 ++++
kernel/sched/core.c | 7 +++----
kernel/sched/core_sched.c | 21 +++++++++++++++++++--
kernel/sched/sched.h | 10 ++--------
5 files changed, 54 insertions(+), 14 deletions(-)

base commit: 2850c2311ef4bf30ae8dd8927f0f66b026ff08fb
--
1.8.3.1



2021-12-23 12:40:56

by Cruz Zhao

[permalink] [raw]
Subject: Re: [PATCH 0/2] Forced idle time accounting per cpu

Here's also a problem confused me: how to account the uncookie'd forced
idle from the perspective of task. A feasible method is to divide the
uncookie'd forced idle time by the number of tasks in the core_tree, and
add the result to these tasks, but it will cost a lot on traversing the
core_tree.

在 2021/12/23 下午8:30, Cruz Zhao 写道:
> Josh Don's patch 4feee7d12603 ("sched/core: Forced idle accounting")
> provides one means to measure the cost of enabling core scheduling
> from the perspective of the task, and this patchset provides another
> means to do that from the perspective of the cpu.
>
> Forced idle can be divided into two types, forced idle with cookie'd task
> running on it SMT sibling, and forced idle with uncookie'd task running
> on it SMT sibling, which should be accounting to measure the cost of
> enabling core scheduling too. This patchset accounts both and the sum
> of both, which are displayed via /proc/stat.
>
> Cruz Zhao (2):
> sched/core: Cookied forceidle accounting per cpu
> sched/core: Uncookied force idle accounting per cpu
>
> fs/proc/stat.c | 26 ++++++++++++++++++++++++++
> include/linux/kernel_stat.h | 4 ++++
> kernel/sched/core.c | 7 +++----
> kernel/sched/core_sched.c | 21 +++++++++++++++++++--
> kernel/sched/sched.h | 10 ++--------
> 5 files changed, 54 insertions(+), 14 deletions(-)
>
> base commit: 2850c2311ef4bf30ae8dd8927f0f66b026ff08fb
>

2022-01-04 07:16:51

by Cruz Zhao

[permalink] [raw]
Subject: Re: [PATCH 0/2] Forced idle time accounting per cpu

Ping.
Accounting forced idle time for per cpu can help us measure the cost of
enabling core scheduling from a global perspective. Mind having a look
at it?
在 2021/12/23 下午8:30, Cruz Zhao 写道:
> Josh Don's patch 4feee7d12603 ("sched/core: Forced idle accounting")
> provides one means to measure the cost of enabling core scheduling
> from the perspective of the task, and this patchset provides another
> means to do that from the perspective of the cpu.
>
> Forced idle can be divided into two types, forced idle with cookie'd task
> running on it SMT sibling, and forced idle with uncookie'd task running
> on it SMT sibling, which should be accounting to measure the cost of
> enabling core scheduling too. This patchset accounts both and the sum
> of both, which are displayed via /proc/stat.
>
> Cruz Zhao (2):
> sched/core: Cookied forceidle accounting per cpu
> sched/core: Uncookied force idle accounting per cpu
>
> fs/proc/stat.c | 26 ++++++++++++++++++++++++++
> include/linux/kernel_stat.h | 4 ++++
> kernel/sched/core.c | 7 +++----
> kernel/sched/core_sched.c | 21 +++++++++++++++++++--
> kernel/sched/sched.h | 10 ++--------
> 5 files changed, 54 insertions(+), 14 deletions(-)
>
> base commit: 2850c2311ef4bf30ae8dd8927f0f66b026ff08fb

2022-01-04 17:58:33

by Josh Don

[permalink] [raw]
Subject: Re: [PATCH 0/2] Forced idle time accounting per cpu

On Mon, Jan 3, 2022 at 11:15 PM cruzzhao <[email protected]> wrote:
>
> Ping.
> Accounting forced idle time for per cpu can help us measure the cost of
> enabling core scheduling from a global perspective. Mind having a look
> at it?

Sorry, just got back from vacation. I'll have a look at the patches
later today, but the idea sounds reasonable.

Best,
Josh