Re: [PATCH] mm, memcg: do full scan initially in force_empty

Michal Hocko
2020-08-03T14:37:13Z

On Mon 03-08-20 22:26:10, Yafang Shao wrote:
> On Mon, Aug 3, 2020 at 10:18 PM Yafang Shao <laoar.shao@gmail.com> wrote:
[...]
> > You can use memcg limits (e.g. memory high) to pro-actively reclaim
> > excess memory. Have you tried that?
>
> The memcg limit not only reclaim the slabs, but also reclaim the pagecaches.

True but drop_cache doesn't distinguish different kind of objects
either. The reclaim will simply try to drop unused cache. All or nothing
behavior of drop_caches is exactly what I dislike about the interface.
Memory reclaim can at least consider age and reflect the general usage
pattern.

> Furthermore, there is no per-memcg vm.vfs_cache_pressure neither.

Why does that matter?

--
Michal Hocko
SUSE Labs