Re: mmotm 2009-09-09-22-56 uploaded

From: David Rientjes
Date: Fri Sep 18 2009 - 05:53:15 EST


On Fri, 18 Sep 2009, Suresh Jayaram wrote:

> I enabled the CONFIG_DEBUG_PER_CPU_MAPS and rebuilt the kernel, but
> now I don't see the oops anymore.

CONFIG_DEBUG_PER_CPU_MAPS will debug it and also silently mask the error
by returning cpu_online_mask instead of a NULL pointer to a non-existant
node_to_cpumask_map.

> But what I see in dmesg output is:
>
> Sep 16 09:22:57 jay-t60p kernel: cpumask_of_node(-1): no node_to_cpumask_map!
>
> followed by a call trace for irqbalance (attached).
>

Sep 16 09:22:57 jay-t60p kernel: cpumask_of_node(-1): no node_to_cpumask_map!
Sep 16 09:22:57 jay-t60p kernel: Pid: 2400, comm: irqbalance Not tainted 2.6.31-rc9-mm1-0.1-default #8
Sep 16 09:22:57 jay-t60p kernel: Call Trace:
Sep 16 09:22:57 jay-t60p kernel: [<ffffffff8102fcf3>] cpumask_of_node+0x4f/0x58
Sep 16 09:22:57 jay-t60p kernel: [<ffffffff811890f3>] local_cpus_show+0x1f/0x48
Sep 16 09:22:57 jay-t60p kernel: [<ffffffff811fe7ba>] dev_attr_show+0x20/0x44
Sep 16 09:22:57 jay-t60p kernel: [<ffffffff81123a19>] sysfs_read_file+0xb2/0x131
Sep 16 09:22:57 jay-t60p kernel: [<ffffffff810cfe34>] vfs_read+0xb1/0x187
Sep 16 09:22:58 jay-t60p kernel: [<ffffffff810cffce>] sys_read+0x47/0x70
Sep 16 09:22:58 jay-t60p kernel: [<ffffffff8100b9eb>] system_call_fastpath+0x16/0x1b

This seems to be related to 2547089 "x86/PCI: initialize PCI bus node
numbers early" since cpumask_of_pcibus() on x86 doesn't check for -1
pcibus_to_node() like most other architectures. It'll simply index into
cpumask_of_node for whatever the pci_sysdata's node is, and in this case
that's -1.

I'm assuming mp_bus_to_node is pointing to a non-online node or simply the
busnum is greater than 256.

[ arch/x86/pci/common.c should _really_ be using NUMA_NO_NODE instead of
hardcoding -1 everywhere, btw. ]
--
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/