Re: [PATCH] vmallocinfo: Add NUMA informations

From: Christoph Lameter
Date: Mon Jun 09 2008 - 10:23:42 EST


On Wed, 4 Jun 2008, Eric Dumazet wrote:

> - return seq_open(file, &vmalloc_op);
> + unsigned int *ptr = NULL;
> + int ret;
> +
> + if (NUMA_BUILD)
> + ptr = kmalloc(nr_node_ids * sizeof(unsigned int), GFP_KERNEL);

Maybe a bit of overkill here. nr_node_ids == 1 in the !NUMA case which
should not do much harm if you alloc the struct anymore.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/