Re: [Patch] physnode_map definition should be signed

From: Martin J. Bligh
Date: Fri Apr 02 2004 - 10:14:26 EST


> In your modification of pfn_valid() for IA32 at 2.6.4 stock kernel,
> it doesn't return 0 even if the node is offline.
>
> True problem is physnode_map's definition.
> Physnode_map[]'s default (offline) value is -1,
> but it is defined as UNSIGNED 8.
> So, pfn_to_nid() return 255.
>
> I think this should be defined as signed like this patch.
> Maximum node number of IA32 is 16, so this is enough yet.
>
> I found this problem on multi-node emulation for memory-hotplug test.
> When I started X on this emulation, system panicked at remap_pte_range()
> by this problem.
> I think that system will be down when a program will call mmap()
> for hardware area.

There are several breakages in this area, particularly on Summit with
4/4 split right now - in my tree I'm init'ing the array to 0 temporarily
to get around some problems, but we have better fixes lined up.

Anyway, your patch looks correct - 128 nodes should be plenty. I shall
apply it. Thanks,

M.

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