On Tue, Dec 17, 2019 at 7:56 PM Michal Hocko <mhocko@xxxxxxxxxx> wrote: > > On Tue 17-12-19 06:29:15, Yafang Shao wrote: > > On my server there're some running MEMCGs protected by memory.{min, low}, > > but I found the usage of these MEMCGs abruptly became very small, which > > were far less than the protect limit. It confused me and finally I > > found that was because of inode stealing. > > What do you mean by this exactly. Are those inodes reclaimed by the > regular memory reclaim or by other means? Because shrink_node does > exclude shrinking slab for protected memcgs. By the regular memory reclaim, kswapd, direct reclaimer or memcg reclaimer. IOW, the current->reclaim_state it set. Take an example for you. kswapd balance_pgdat shrink_node_memcgs switch (mem_cgroup_protected) <<<< memory.current= 1024M memory.min = 512M a file has 800M page caches case MEMCG_PROT_NONE: <<<< hard limit is not reached. beak; shrink_lruvec shrink_slab <<< it may free the inode and the free all its page caches (800M) Hope it could clarify. Thanks Yafang