On Thu 29-08-24 18:19:16, Zhongkun He wrote: > This patch proposes augmenting the memory.reclaim interface with a > disable_unmap_file argument that will skip the mapped pages in > that reclaim attempt. > > For example: > > echo "2M disable_unmap_file" > /sys/fs/cgroup/test/memory.reclaim > > will perform reclaim on the test cgroup with no mapped file page. > > The memory.reclaim is a useful interface. We can carry out proactive > memory reclaim in the user space, which can increase the utilization > rate of memory. > > In the actual usage scenarios, we found that when there are sufficient > anonymous pages, mapped file pages with a relatively small proportion > would still be reclaimed. This is likely to cause an increase in > refaults and an increase in task delay, because mapped file pages > usually include important executable codes, data, and shared libraries, > etc. According to the verified situation, if we can skip this part of > the memory, the task delay will be reduced. Do you have examples of workloads where this is demonstrably helps and cannot be tuned via swappiness? -- Michal Hocko SUSE Labs