On Fri, Mar 19, 2021 at 05:31:20PM +0800, Alex Shi wrote: > > > 在 2021/3/13 下午3:57, Yu Zhao 写道: > > +Recipes > > +------- > > +:Android on ARMv8.1+: ``X=4``, ``N=0`` > > + > > +:Android on pre-ARMv8.1 CPUs: Not recommended due to the lack of > > + ``ARM64_HW_AFDBM`` > > + > > +:Laptops running Chrome on x86_64: ``X=7``, ``N=2`` > > + > > +:Working set estimation: Write ``+ memcg_id node_id gen [swappiness]`` > > + to ``/sys/kernel/debug/lru_gen`` to account referenced pages to > > + generation ``max_gen`` and create the next generation ``max_gen+1``. > > + ``gen`` must be equal to ``max_gen`` in order to avoid races. A swap > > + file and a non-zero swappiness value are required to scan anon pages. > > + If swapping is not desired, set ``vm.swappiness`` to ``0`` and > > + overwrite it with a non-zero ``swappiness``. > > + > > +:Proactive reclaim: Write ``- memcg_id node_id gen [swappiness] > > + [nr_to_reclaim]`` to ``/sys/kernel/debug/lru_gen`` to evict > > + generations less than or equal to ``gen``. ``gen`` must be less than > > + ``max_gen-1`` as ``max_gen`` and ``max_gen-1`` are active generations > > + and therefore protected from the eviction. ``nr_to_reclaim`` can be > > + used to limit the number of pages to be evicted. Multiple command > > + lines are supported, so does concatenation with delimiters ``,`` and > > + ``;``. > > + > > These are difficult options for users, especially for 'races' involving. > Is it possible to simplify them for end users? They look simple for a few lruvecs, but do become human-unfriendly on servers that have thousands of lruvecs. It's certainly possible simplify them, but we'd have to sacrifice some flexibility. Any particular idea in mind?