Re: [PATCH 7/9] sched,debug: Convert sysctl sched_domains to debugfs
From: Dietmar Eggemann
Date: Fri Mar 26 2021 - 09:13:01 EST
On 26/03/2021 11:33, Peter Zijlstra wrote:
> Stop polluting sysctl, move to debugfs for SCHED_DEBUG stuff.
>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
> ---
> kernel/sched/debug.c | 255 ++++++++++--------------------------------------
> kernel/sched/sched.h | 2
> kernel/sched/topology.c | 1
> 3 files changed, 59 insertions(+), 199 deletions(-)
Reviewed-by: Dietmar Eggemann <dietmar.eggemann@xxxxxxx>
[...]
> +#define SDM(type, mode, member) \
> + debugfs_create_##type(#member, mode, parent, &sd->member)
>
> - WARN_ON(sd_ctl_dir[0].child);
> - sd_ctl_dir[0].child = cpu_entries;
> - }
> + SDM(ulong, 0644, min_interval);
> + SDM(ulong, 0644, max_interval);
> + SDM(u64, 0644, max_newidle_lb_cost);
> + SDM(u32, 0644, busy_factor);
> + SDM(u32, 0644, imbalance_pct);
> + SDM(u32, 0644, cache_nice_tries);
> +// SDM(x32, 0444, flags);
Can be removed.
> + SDM(str, 0444, name);
>
> - if (!cpu_idx) {
> - struct ctl_table *e = cpu_entries;
> +#undef SDM
>
> - cpu_idx = kcalloc(nr_cpu_ids, sizeof(struct ctl_table*), GFP_KERNEL);
> - if (!cpu_idx)
> - return;
> + debugfs_create_file("flags", 0444, parent, &sd->flags, &sd_flags_fops);
> +}
[...]