Re: [RFC v1] memcg: add memcg lru for page reclaiming

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 21 Oct 2019 14:14:53 +0200 Michal Hocko wrote:
> 
> On Mon 21-10-19 19:56:54, Hillf Danton wrote:
> > 
> > Currently soft limit reclaim is frozen, see
> > Documentation/admin-guide/cgroup-v2.rst for reasons.
> > 
> > Copying the page lru idea, memcg lru is added for selecting victim
> > memcg to reclaim pages from under memory pressure. It now works in
> > parallel to slr not only because the latter needs some time to reap
> > but the coexistence facilitates it a lot to add the lru in a straight
> > forward manner.
> 
> This doesn't explain what is the problem/feature you would like to
> fix/achieve. It also doesn't explain the overall design. 

1, memcg lru makes page reclaiming hierarchy aware

While doing the high work, memcgs are currently reclaimed one after
another up through the hierarchy; in this RFC after ripping pages off
the first victim, the work finishes with the first ancestor of the victim
added to lru.

Recaliming is defered until kswapd becomes active.

2, memcg lru tries much to avoid overreclaim

Only one memcg is picked off lru in FIFO mode under memory pressure,
and MEMCG_CHARGE_BATCH pages are reclaimed one memcg at a time.

In next version, a new function will be added for kswapd to call,

	void memcg_try_to_free_pages(void)

with CONFIG_MEMCG_LRU dropped and mem_cgroup_soft_limit_reclaim()
untouched.

Thanks
Hillf





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux