Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1698004

Re: [PATCH 2/2] cgroup: revert fa06235b8eb0 ("cgroup: reset css on destruction")

From Tejun Heo <tj@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] cgroup: revert fa06235b8eb0 ("cgroup: reset css on destruction")
Date 2017-07-27 16:00 +0200
Message-ID <u7Ruy-6NU-11@gated-at.bofh.it> (permalink)
References <u7q1j-6pF-9@gated-at.bofh.it> <u7Ruy-6NU-13@gated-at.bofh.it> <u7Ruy-6NU-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Jul 27, 2017 at 02:04:28PM +0100, Roman Gushchin wrote:
> Commit fa06235b8eb0 ("cgroup: reset css on destruction") caused
> css_reset callback to be called from the offlining path. Although
> it solves the problem mentioned in the commit description
> ("For instance, memory cgroup needs to reset memory.low, otherwise
> pages charged to a dead cgroup might never get reclaimed."),
> generally speaking, it's not correct.
> 
> An offline cgroup can still be a resource domain, and we shouldn't
> grant it more resources than it had before deletion.
> 
> For instance, if an offline memory cgroup has dirty pages, we should
> still imply i/o limits during writeback.
> 
> The css_reset callback is designed to return the cgroup state
> into the original state, that means reset all limits and counters.
> It's spomething different from the offlining, and we shouldn't use
> it from the offlining path. Instead, we should adjust necessary
> settings from the per-controller css_offline callbacks (e.g. reset
> memory.low).
> 
> Signed-off-by: Roman Gushchin <guro@fb.com>
> Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
> Cc: Tejun Heo <tj@kernel.org>
> Cc: Johannes Weiner <hannes@cmpxchg.org>
> Cc: Michal Hocko <mhocko@kernel.org>
> Cc: kernel-team@fb.com
> Cc: cgroups@vger.kernel.org
> Cc: linux-mm@kvack.org
> Cc: linux-kernel@vger.kernel.org

Acked-by: Tejun Heo <tj@kernel.org>

Please feel free to route with the previous patch through -mm.

Thanks.

-- 
tejun

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH] mm, memcg: reset low limit during memcg offlining Vladimir Davydov <vdavydov.dev@gmail.com> - 2017-07-25 14:10 +0200
  Re: [PATCH] mm, memcg: reset low limit during memcg offlining Michal Hocko <mhocko@kernel.org> - 2017-07-25 14:50 +0200
  Re: [PATCH] mm, memcg: reset low limit during memcg offlining Vladimir Davydov <vdavydov.dev@gmail.com> - 2017-07-26 10:40 +0200
    Re: [PATCH] mm, memcg: reset low limit during memcg offlining Tejun Heo <tj@kernel.org> - 2017-07-26 14:10 +0200
    Re: [PATCH 2/2] cgroup: revert fa06235b8eb0 ("cgroup: reset css on  destruction") Tejun Heo <tj@kernel.org> - 2017-07-27 16:00 +0200
    Re: [PATCH 1/2] mm, memcg: reset memory.low during memcg offlining Johannes Weiner <hannes@cmpxchg.org> - 2017-07-27 16:40 +0200
    Re: [PATCH 2/2] cgroup: revert fa06235b8eb0 ("cgroup: reset css on  destruction") Johannes Weiner <hannes@cmpxchg.org> - 2017-07-27 16:40 +0200
    Re: [PATCH 1/2] mm, memcg: reset memory.low during memcg offlining Michal Hocko <mhocko@kernel.org> - 2017-07-27 16:50 +0200

csiph-web