[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150918074217.GD15395@cmpxchg.org>
Date: Fri, 18 Sep 2015 09:42:17 +0200
From: Johannes Weiner <hannes@...xchg.org>
To: Jerome Marchand <jmarchan@...hat.com>
Cc: Michal Hocko <mhocko@...nel.org>, cgroups@...r.kernel.org,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: memcontrol: fix order calculation in try_charge()
On Tue, Sep 15, 2015 at 02:05:57PM +0200, Jerome Marchand wrote:
> Since commit <6539cc05386> (mm: memcontrol: fold mem_cgroup_do_charge()),
> the order to pass to mem_cgroup_oom() is calculated by passing the number
> of pages to get_order() instead of the expected size in bytes. AFAICT,
> it only affects the value displayed in the oom warning message.
> This patch fix this.
>
> Signed-off-by: Jerome Marchand <jmarchan@...hat.com>
Acked-by: Johannes Weiner <hannes@...xchg.org>
Thanks, Jerome. One minor thing:
> @@ -2032,7 +2032,8 @@ retry:
>
> mem_cgroup_events(mem_over_limit, MEMCG_OOM, 1);
>
> - mem_cgroup_oom(mem_over_limit, gfp_mask, get_order(nr_pages));
> + mem_cgroup_oom(mem_over_limit, gfp_mask,
> + get_order(nr_pages * PAGE_SIZE));
fls(nr_pages)?
get_order() is basically fls(x / PAGE_SIZE).
--
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