[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170223011644.GB8841@balbir.ozlabs.ibm.com>
Date: Thu, 23 Feb 2017 12:16:44 +1100
From: Balbir Singh <bsingharora@...il.com>
To: Laurent Dufour <ldufour@...ux.vnet.ibm.com>
Cc: Johannes Weiner <hannes@...xchg.org>,
Michal Hocko <mhocko@...nel.org>,
Vladimir Davydov <vdavydov.dev@...il.com>,
cgroups@...r.kernel.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] mm/cgroup: delay soft limit data allocation
On Wed, Feb 22, 2017 at 04:58:11PM +0100, Laurent Dufour wrote:
> Until a soft limit is set to a cgroup, the soft limit data are useless
> so delay this allocation when a limit is set.
>
> Suggested-by: Michal Hocko <mhocko@...nel.org>
> Signed-off-by: Laurent Dufour <ldufour@...ux.vnet.ibm.com>
> ---
<snip>
> @@ -3000,6 +3035,8 @@ static ssize_t mem_cgroup_write(struct kernfs_open_file *of,
> }
> break;
> case RES_SOFT_LIMIT:
> + if (!soft_limit_initialized)
> + soft_limit_initialize();
What happens if this fails? Do we disable this interface?
It's a good idea, but I wonder if we can deal with certain
memory cgroups not supporting soft limits due to memory
shortage at the time of using them.
> memcg->soft_limit = nr_pages;
> ret = 0;
> break;
Balbir Singh.
Powered by blists - more mailing lists