* Re: [PATCH] mm: memcontrol: reset memory.low on css offline
[not found] ` <1456766193-16255-1-git-send-email-vdavydov-5HdwGun5lf+gSpxsJD1C4w@public.gmane.org>
@ 2016-02-29 20:02 ` Johannes Weiner
[not found] ` <20160229200255.GA32539-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Johannes Weiner @ 2016-02-29 20:02 UTC (permalink / raw)
To: Vladimir Davydov
Cc: Andrew Morton, Michal Hocko, linux-mm-Bw31MaZKKs3YtjvyW6yDsg,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Tejun Heo,
cgroups-u79uwXL29TY76Z2rM5mHXA
On Mon, Feb 29, 2016 at 08:16:33PM +0300, Vladimir Davydov wrote:
> When a cgroup directory is removed, the memory cgroup subsys state does
> not disappear immediately. Instead, it's left hanging around until the
> last reference to it is gone, which implies reclaiming all pages from
> its lruvec.
>
> In the unified hierarchy, there's the memory.low knob, which can be used
> to set a best-effort protection for a memory cgroup - the reclaimer
> first scans those cgroups whose consumption is above memory.low, and
> only if it fails to reclaim enough pages, it gets to the rest.
>
> Currently this protection is not reset when the cgroup directory is
> removed. As a result, if a dead memory cgroup has a lot of page cache
> charged to it and a high value of memory.low, it will result in higher
> pressure exerted on live cgroups, and userspace will have no ways to
> detect such consumers and reconfigure memory.low properly.
>
> To fix this, let's reset memory.low on css offline.
We already have mem_cgroup_css_reset() for soft-offlining a css - when
the css is asked to be disabled but another subsystem still uses it.
Can we just call that function during offline as well? The css can be
around for quite a bit after the user deleted it. Eliminating *any*
user-supplied configurations and zapping it back to defaults makes
sense in general, so that we never have to worry about any remnants.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] mm: memcontrol: reset memory.low on css offline
[not found] ` <20160229200255.GA32539-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
@ 2016-02-29 20:55 ` Tejun Heo
0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2016-02-29 20:55 UTC (permalink / raw)
To: Johannes Weiner
Cc: Vladimir Davydov, Andrew Morton, Michal Hocko,
linux-mm-Bw31MaZKKs3YtjvyW6yDsg,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
cgroups-u79uwXL29TY76Z2rM5mHXA
Hello,
On Mon, Feb 29, 2016 at 03:02:55PM -0500, Johannes Weiner wrote:
> > To fix this, let's reset memory.low on css offline.
>
> We already have mem_cgroup_css_reset() for soft-offlining a css - when
> the css is asked to be disabled but another subsystem still uses it.
> Can we just call that function during offline as well? The css can be
> around for quite a bit after the user deleted it. Eliminating *any*
> user-supplied configurations and zapping it back to defaults makes
> sense in general, so that we never have to worry about any remnants.
Hmmm... I wonder whether the behavior can be a bit surprising and it
could be better to simply let memcg offline callback to call the reset
function explicitly. No big deal either way tho. Please feel free to
send a patch.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-02-29 20:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1456766193-16255-1-git-send-email-vdavydov@virtuozzo.com>
[not found] ` <1456766193-16255-1-git-send-email-vdavydov-5HdwGun5lf+gSpxsJD1C4w@public.gmane.org>
2016-02-29 20:02 ` [PATCH] mm: memcontrol: reset memory.low on css offline Johannes Weiner
[not found] ` <20160229200255.GA32539-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
2016-02-29 20:55 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).