Re: [PATCH v4] sched/numa: Fix divide by zero for sysctl_numa_balancing_scan_size.

From: Peter Zijlstra
Date: Mon May 01 2023 - 14:55:59 EST


On Mon, May 01, 2023 at 12:21:17PM -0400, chris hyser wrote:
> In terms of actually wanting to fix this, I'm a bit confused. It clearly was
> worth fixing the first time around (it has your sign-off), and the only
> thing that has changed is that that fix no longer works.

Well, the amount of effort to fix it has dramatically increased, 40+
extra lines vs 2 extra lines.

> > If we do find we want this (why?!) then should we not invest in a better
> > debugfs_create_u32_minmax() or something so that we don't get to add 40+
> > lines for everthing we want to add limits on?
>
> I will look at a way to greatly simplify the bounds checking here as you
> suggest.

Thanks, that might make it all a lot nicer indeed.