Re: [PATCH 2/3] add dev_to_node()

From: KAMEZAWA Hiroyuki
Date: Tue Nov 07 2006 - 21:38:12 EST


Hi, I have a question.

On Sat, 4 Nov 2006 23:56:29 +0100
Christoph Hellwig <hch@xxxxxx> wrote:
> Index: linux-2.6/include/linux/device.h
> ===================================================================
> --- linux-2.6.orig/include/linux/device.h 2006-10-29 16:02:38.000000000 +0100
> +++ linux-2.6/include/linux/device.h 2006-11-02 12:47:17.000000000 +0100
> @@ -347,6 +347,9 @@
> BIOS data),reserved for device core*/
> struct dev_pm_info power;
>
> +#ifdef CONFIG_NUMA
> + int numa_node; /* NUMA node this device is close to */
> +#endif

> + dev->dev.numa_node = pcibus_to_node(bus);

Does this "node" is guaranteed to be online ?

if node is not online, NODE_DATA(node) is NULL or not initialized.
Then, alloc_pages_node() at el. will panic.

I wonder there are no code for creating NODE_DATA() for device-only-node.

-Kame

-
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/