Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> writes: > On Mon, 24 Oct 2022 12:05:53 -0700 Stefan Roesch <shr@xxxxxxxxxxxx> wrote: > >> To get finer granularity for ratio calculations use part per 1000 >> instead of percentiles. This is especially important if we want to >> automatically convert byte values to ratios. Otherwise the values that >> are actually used can be quite different. This is also important for >> machines with more main memory (1% of 256GB is already 2.5GB). >> >> ... >> > > This changes an existing userspace interface, doesn't it? > /sys/class/bdi/<bdi>/min_ratio. Can't do that! > It does not change the user interface. It maintains the percent values in the min_ratio and max_ratio knobs. For instance: -BDI_SHOW(min_ratio, bdi->min_ratio) +BDI_SHOW(min_ratio, bdi->min_ratio / BDI_RATIO_SCALE) > We could add a new interace to the same thing, I guess. > /sys/class/bdi/<bdi>/min_ratio_fine or whatever. > > We might want to go for more than 100->1000, too. Otherwise in a few > years we'll be adding /sys/class/bdi/<bdi>/min_ratio_even_finer. > The next version of the patch series will also add min_ratio_fine and max_ratio_fine. This makes sure that also ratio values can be specified with a finer granularity. > Also, this patch forgot to update > Documentation/ABI/testing/sysfs-class-bdi. The exisiting user behavior is not changed, only the internal calculation.