[libtopology-dev] libtopology v0.3

Nathan Lynch ntl at pobox.com
Fri Oct 17 17:35:23 EST 2008


Hi-

I've created a v0.3 tag and pushed this out as the first release:

http://libtopology.ozlabs.org/releases/libtopology-0.3.tar.gz

This contains a few basic capabilities:

* Support for enumerating/traversing NUMA nodes, processor
  packages/sockets, cores, and hardware threads; support for
  discovering these objects' associated logical CPUs.

* Support for querying processor caches and discovering their type,
  size, level, and associated logical CPUs.

Full exploitation of these capabilities depends on the information the
kernel makes available in sysfs.  I've tested on i386, x86_64, ia64,
and powerpc[1] with a variety of distributions and kernels (going back to
2.6.18 or so).

Hugh Blemings implemented support for generating documentation via
doxygen ("make doc").  Thanks Hugh!

>From this point on, I don't intend to make any ABI/API-breaking
changes without incrementing the major version number, and barring
major design mistakes this won't happen any time soon.  The only
potential ABI-breaker on the horizon is hotplug notification support,
but I'm optimistic that it won't come to that.

If you haven't looked at the source in the last couple of weeks, the
user-visible API is now much slimmer (and more maintainable IMO);
please see include/topology.h.

Planned features for future releases include:
* Reporting cache line size and associativity
* Cell SPU support [2]
* Reporting NUMA node memory and distance information
* Reporting of processor/node affinity for additional devices
* Processor (and memory?) hotplug event notification

Do speak up if you'd like anything added to this list.

[1] powerpc needs a 2.6.27 kernel for accurate enumeration of sockets
and cores; obtaining cache info via libtopology on powerpc does not
work on current kernels because of the lack of a "shared_cpu_map"
attribute in the sysfs cache hierarchies.

[2] It would be nice if someone could send me the output of
"grep -r . /sys/devices/system/spu" from a Cell system as I don't have
easy access to a working one right now.  This would enable me to write
a testcase.



More information about the libtopology-dev mailing list