[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.02.1403051853010.30075@chino.kir.corp.google.com>
Date: Wed, 5 Mar 2014 18:53:23 -0800 (PST)
From: David Rientjes <rientjes@...gle.com>
To: Andrew Morton <akpm@...ux-foundation.org>
cc: Johannes Weiner <hannes@...xchg.org>,
Michal Hocko <mhocko@...e.cz>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
Christoph Lameter <cl@...ux-foundation.org>,
Pekka Enberg <penberg@...nel.org>, Tejun Heo <tj@...nel.org>,
Mel Gorman <mgorman@...e.de>, Oleg Nesterov <oleg@...hat.com>,
Rik van Riel <riel@...hat.com>,
Jianguo Wu <wujianguo@...wei.com>,
Tim Hockin <thockin@...gle.com>, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, cgroups@...r.kernel.org,
linux-doc@...r.kernel.org
Subject: Re: [patch 04/11] mm, memcg: add tunable for oom reserves
On Wed, 5 Mar 2014, Andrew Morton wrote:
> > --- a/mm/memcontrol.c
> > +++ b/mm/memcontrol.c
> > @@ -315,6 +315,9 @@ struct mem_cgroup {
> > /* OOM-Killer disable */
> > int oom_kill_disable;
> >
> > + /* reserves for handling oom conditions, protected by res.lock */
> > + unsigned long long oom_reserve;
>
> Units? bytes, I assume.
>
Yes, fixed.
> > /* set when res.limit == memsw.limit */
> > bool memsw_is_minimum;
> >
> > @@ -5936,6 +5939,51 @@ static int mem_cgroup_oom_control_write(struct cgroup_subsys_state *css,
> > return 0;
> > }
> >
> > +static int mem_cgroup_resize_oom_reserve(struct mem_cgroup *memcg,
> > + unsigned long long new_limit)
> > +{
> > + struct res_counter *res = &memcg->res;
> > + u64 limit, usage;
> > + int ret = 0;
>
> The code mixes u64's and unsigned long longs in inexplicable ways.
> Suggest using u64 throughout.
>
Ok!
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists