Re: [PATCH v3 2/3] sched/debug: dump domains' level

From: Vincent Guittot
Date: Thu Apr 04 2024 - 08:28:32 EST


On Wed, 3 Apr 2024 at 15:28, Vitalii Bursov <vitaly@xxxxxxxxxx> wrote:
>
> Knowing domain's level exactly can be useful when setting
> relax_domain_level or cpuset.sched_relax_domain_level
>
> Usage:
> cat /debug/sched/domains/cpu0/domain1/level
> to dump cpu0 domain1's level.
>
> Signed-off-by: Vitalii Bursov <vitaly@xxxxxxxxxx>

Acked-by: Vincent Guittot <vincent.guittot@xxxxxxxxxx>

> ---
> kernel/sched/debug.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
> index 8d5d98a5834d..c1eb9a1afd13 100644
> --- a/kernel/sched/debug.c
> +++ b/kernel/sched/debug.c
> @@ -425,6 +425,7 @@ static void register_sd(struct sched_domain *sd, struct dentry *parent)
>
> debugfs_create_file("flags", 0444, parent, &sd->flags, &sd_flags_fops);
> debugfs_create_file("groups_flags", 0444, parent, &sd->groups->flags, &sd_flags_fops);
> + debugfs_create_u32("level", 0444, parent, (u32 *)&sd->level);
> }
>
> void update_sched_domain_debugfs(void)
> --
> 2.20.1
>