Re: memcg reclaim demotion wrt. isolation

From: Michal Hocko
Date: Wed Dec 14 2022 - 04:49:43 EST


On Wed 14-12-22 10:57:52, Huang, Ying wrote:
> Michal Hocko <mhocko@xxxxxxxx> writes:
[...]
> > This makes sense but I suspect that this wasn't intended also for
> > memcg triggered reclaim. This would mean that a memory pressure in one
> > hierarchy could trigger paging out pages of a different hierarchy if the
> > demotion target is close to full.
>
> It seems that it's unnecessary to wake up kswapd of demotion target node
> in most cases. Because we will try to reclaim on the demotion target
> nodes in the loop of do_try_to_free_pages(). It may be better to loop
> the zonelist in the reverse order. Because the demotion targets are
> usually located at the latter of the zonelist.

Reclaiming from demotion targets first would deal with that as well.
Thanks! Let's establish whether this is something we really need/want
fix first.
--
Michal Hocko
SUSE Labs