bitmask/nodemask strangeness with sparse node ids

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Hello,

I am debugging some problems on a strange power7 virtual node that
contains 3 sparse-numbered NUMA nodes:
* node#0 has NO memory but many CPUs
* node#2 and #3 have memory but no CPUs

I am trying to understand what numa_all_nodes_ptr and friends are
supposed to contain. I see:
    numa_all_nodes_ptr = bits 2 & 3
This seems to match the manpage when it says "representing all nodes on
which the calling task may allocate memory". But it doesn't really match
when it says "a bit mask that has all available nodes set" above (should
be bits 0&2&3).

If I look at numa_all_nodes instead, I get bits 0 & 1. libnuma.c seems
to set as many first bits as there are nodes I can allocate from. But I
don't see anywhere in the code something that can deal with such
nodemask on sparse-numbered platforms. For instance,
copy_bitmask_to_nodemask(numa_all_nodes_ptr, foo) puts bits 2 & 3 in foo
while foo should be equal to numa_all_nodes.

So:
* is the nodemask API known to be broken when node ids are sparse?
* is the nodemask API officially deprecated? If so, could this be
clarified in the header and manpage? The definition of nodemask_t is
very close to the header of numa.h without anything saying "don't use it".
I actually think that everything nodemask_t related should be out of
numa.h and out of the manpage. If people should not use them, they
should be hidden. It could be moved in something like numacompat1.h for
instance. Right now, things are very confusing (especially when one
finds numa_allocate_nodemask() which returns a bitmask :))

Thanks
Brice Goglin

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


[Home]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Free Online Dating]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Devices]

Add to Google Powered by Linux