[PATCH] fix NUMA topology parsing

Dave Hansen haveblue at us.ibm.com
Fri May 7 10:18:08 EST 2004


The OpenFirmware tables that specify CPU and memory topology end up
looking something like this:

CPU
0: 0 0 0
1: 0 0 0
2: 0 1 1
3: 0 1 1
Memory:
0: 0 0 0 0
1: 0 0 0 1
2: 0 0 0 2
3: 0 0 f 3
4: 0 1 1 4
5: 0 1 1 5
6: 0 1 1 6
7: 0 1 1 7

What we do right now is use the lowest topology level that both memory
and CPUs have.  So, in this case, the 3rd column.  The problem is that
the 3rd column has some gunk in it for some reason.  The hardware docs
suggests using the first level where 2 resources differ to determine how
far apart they are.  This patch does that, and ends up picking the 2nd
level instead.

Patch is against 2.6.5.  Tested on 64GB 8-way POWER4.

-- Dave


** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list