[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20101103141529.GA7713@localhost>
Date: Wed, 3 Nov 2010 22:15:29 +0800
From: Wu Fengguang <fengguang.wu@...el.com>
To: Jesper Juhl <jj@...osbits.net>
Cc: Johannes Weiner <hannes@...xchg.org>, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, Balbir Singh <balbir@...ux.vnet.ibm.com>,
Pavel Emelianov <xemul@...nvz.org>,
Minchan Kim <minchan.kim@...il.com>,
Paul Menage <menage@...gle.com>,
Li Zefan <lizf@...fujitsu.com>,
containers@...ts.linux-foundation.org
Subject: Re: [PATCH] cgroup: prefer [kv]zalloc over [kv]malloc+memset in
memory controller code.
On Mon, Nov 01, 2010 at 08:59:13PM +0100, Jesper Juhl wrote:
> @@ -4169,13 +4169,11 @@ static int alloc_mem_cgroup_per_zone_info(struct mem_cgroup *mem, int node)
> */
> if (!node_state(node, N_NORMAL_MEMORY))
> tmp = -1;
> - pn = kmalloc_node(sizeof(*pn), GFP_KERNEL, tmp);
> + pn = kmalloc_node(sizeof(*pn), GFP_KERNEL|__GFP_ZERO, tmp);
Use the simpler kzalloc_node()? It's introduced here:
commit 979b0fea2d9ae5d57237a368d571cbc84655fba6
Author: Jeff Layton <jlayton@...hat.com>
Date: Thu Jun 5 22:47:00 2008 -0700
vm: add kzalloc_node() inline
Reviewed-by: Wu Fengguang <fengguang.wu@...el.com>
Thanks,
Fengguang
--
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