Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755318Ab0KCOPe (ORCPT ); Wed, 3 Nov 2010 10:15:34 -0400 Received: from mga09.intel.com ([134.134.136.24]:8595 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754987Ab0KCOPc (ORCPT ); Wed, 3 Nov 2010 10:15:32 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.58,289,1286175600"; d="scan'208";a="569969964" Date: Wed, 3 Nov 2010 22:15:29 +0800 From: Wu Fengguang To: Jesper Juhl Cc: Johannes Weiner , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Balbir Singh , Pavel Emelianov , Minchan Kim , Paul Menage , Li Zefan , containers@lists.linux-foundation.org Subject: Re: [PATCH] cgroup: prefer [kv]zalloc over [kv]malloc+memset in memory controller code. Message-ID: <20101103141529.GA7713@localhost> References: <20101101200122.GH840@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 915 Lines: 27 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 Date: Thu Jun 5 22:47:00 2008 -0700 vm: add kzalloc_node() inline Reviewed-by: Wu Fengguang Thanks, Fengguang -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/