[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140922201137.GB5373@cmpxchg.org>
Date: Mon, 22 Sep 2014 16:11:37 -0400
From: Johannes Weiner <hannes@...xchg.org>
To: Vladimir Davydov <vdavydov@...allels.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
Michal Hocko <mhocko@...e.cz>, Christoph Lameter <cl@...ux.com>
Subject: Re: [PATCH 2/2] memcg: move memcg_update_cache_size to slab_common.c
On Thu, Sep 18, 2014 at 07:50:20PM +0400, Vladimir Davydov wrote:
> The only reason why this function lives in memcontrol.c is that it
> depends on memcg_caches_array_size. However, we can pass the new array
> size immediately to it instead of new_id+1 so that it will be free of
> any memcontrol.c dependencies.
>
> So let's move this function to slab_common.c and make it static.
>
> Signed-off-by: Vladimir Davydov <vdavydov@...allels.com>
> Cc: Johannes Weiner <hannes@...xchg.org>
> Cc: Michal Hocko <mhocko@...e.cz>
> Cc: Christoph Lameter <cl@...ux.com>
Looks good. One nit below, but not a show stopper.
Acked-by: Johannes Weiner <hannes@...xchg.org>
> @@ -646,11 +646,13 @@ int memcg_limited_groups_array_size;
> struct static_key memcg_kmem_enabled_key;
> EXPORT_SYMBOL(memcg_kmem_enabled_key);
>
> +static void memcg_free_cache_id(int id);
Any chance you could re-order this code to avoid the forward decl?
memcg_alloc_cache_id() and memcg_free_cache_id() are new functions
anyway, might as well put the definition above the callsites.
Thanks!
--
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