On Wed, Sep 4, 2024 at 8:35 PM Davidlohr Bueso <dave@xxxxxxxxxxxx> wrote: > > On Wed, 04 Sep 2024, Andrew Morton wrote:\n > >On Wed, 4 Sep 2024 18:08:05 -0700 Davidlohr Bueso <dave@xxxxxxxxxxxx> wrote: > > > >> On Wed, 04 Sep 2024, Andrew Morton wrote:\n > >> >On Wed, 4 Sep 2024 09:27:40 -0700 Davidlohr Bueso <dave@xxxxxxxxxxxx> wrote: > >> > > >> >> This adds support for allowing proactive reclaim in general on a > >> >> NUMA system. A per-node interface extends support for beyond a > >> >> memcg-specific interface, respecting the current semantics of > >> >> memory.reclaim: respecting aging LRU and not supporting > >> >> artificially triggering eviction on nodes belonging to non-bottom > >> >> tiers. > >> >> > >> >> This patch allows userspace to do: > >> >> > >> >> echo 512M swappiness=10 > /sys/devices/system/node/nodeX/reclaim > >> > > >> >One value per sysfs file is a rule. > >> > >> I wasn't aware of it as a rule - is this documented somewhere? > > > >Documentation/filesystems/sysfs.rst, line 62. Also lots of gregkh > >grumpygrams :) > > > >> I ask because I see some others are using space-separated parameters, ie: > >> > >> /sys/bus/usb/drivers/foo/new_id > >> > >> ... or colons. What would be acceptable? echo "512M:10" > ... ? > > > >Kinda cheating. But the rule gets violated a lot. > > The only other alternative I can think of is to have a separate file > for swappiness, which of course sucks. So I will go with the colon > approach unless somebody shouts - I still prefer it as is in this patch, > if we are going to violate the rule altogether... I also prefer this patch's approach. It'd be really confusing if the per-node and per-memcg proactive reclaim interfaces have the same semantics but different syntax.