Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756218AbYFIOQ6 (ORCPT ); Mon, 9 Jun 2008 10:16:58 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751958AbYFIOQu (ORCPT ); Mon, 9 Jun 2008 10:16:50 -0400 Received: from netops-testserver-3-out.sgi.com ([192.48.171.28]:38692 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751322AbYFIOQt (ORCPT ); Mon, 9 Jun 2008 10:16:49 -0400 Date: Mon, 9 Jun 2008 07:16:48 -0700 (PDT) From: Christoph Lameter X-X-Sender: clameter@schroedinger.engr.sgi.com To: Andrew Morton cc: Eric Dumazet , kosaki.motohiro@jp.fujitsu.com, nickpiggin@yahoo.com.au, hugh@veritas.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] vmallocinfo: Add NUMA informations In-Reply-To: <20080603144054.973284bb.akpm@linux-foundation.org> Message-ID: References: <48439916.2070108@cosmosbay.com> <20080602160548.B6D4.KOSAKI.MOTOHIRO@jp.fujitsu.com> <4844BC75.8040705@cosmosbay.com> <20080603144054.973284bb.akpm@linux-foundation.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 892 Lines: 23 On Tue, 3 Jun 2008, Andrew Morton wrote: > > + if (NUMA_BUILD) { > > + unsigned int *counters, nr; > > + > > + counters = kzalloc(nr_node_ids * sizeof(unsigned int), > > This is kcalloc(). If you like that sorts of thing - I think kcalloc() > is pretty pointless personally. Same here. I think its generally ignored. I tried to remove it at some point in the past. If we want kcalloc then we also need kczalloc. It would be best to keep the interface simple. > Do we actually need dynamic allocation here? There's a small, > constant, known-at-compile-time upper bound to the number of nodes IDs? The number of node ids may reach 1024. -- 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/