libvirt/docs/examples
Jim Meyering d010b68962 make NUMA-initialization code more portable and more robust
qemudCapsInitNUMA and umlCapsInitNUMA were identical, so this change
factors them into a new function, virCapsInitNUMA, and puts it in
nodeinfo.c.

In addition to factoring out the duplicates, this change also
adjusts that function definition (along with its macros) so
that it works with Fedora 9's numactl version 1, and makes it
so the code will work even if someone builds the kernel with
CONFIG_NR_CPUS > 4096.

Finally, also perform this NUMA initialization for the lxc
and openvz drivers.

* src/nodeinfo.c: Include <stdint.h>, <numa.h> and "memory.h".
(virCapsInitNUMA): Rename from qemudCapsInitNUMA and umlCapsInitNUMA.
(NUMA_MAX_N_CPUS): Define depending on NUMA API version.
(n_bits, MASK_CPU_ISSET): Define, adjust, use uint64 rather than long.
* src/nodeinfo.h: Include "capabilities.h".
(virCapsInitNUMA): Declare it.
* examples/domain-events/events-c/Makefile.am:
* src/Makefile.am: Add $(NUMACTL_CFLAGS) and $(NUMACTL_LIBS) to various
compile/link-related variables.
* src/qemu_conf.c: Include "nodeinfo.h".
(qemudCapsInitNUMA): Remove duplicate code.  Adjust caller.
* src/uml_conf.c (umlCapsInitNUMA): Likewise.
Include "nodeinfo.h".
* src/lxc_conf.c: Include "nodeinfo.h".
(lxcCapsInit): Perform NUMA initialization here, too.
* src/openvz_conf.c (openvzCapsInit): And here.
Include "nodeinfo.h".
* src/libvirt_sym.version.in: Add virCapsInitNUMA so that libvirtd
can link to this function.
2008-12-21 18:55:09 +00:00
..
python generate .gitignore files from .cvsignore ones 2008-10-17 10:03:15 +00:00
.cvsignore make NUMA-initialization code more portable and more robust 2008-12-21 18:55:09 +00:00
.gitignore cvsignore mingw build artifacts: *.exe 2008-10-28 17:47:54 +00:00
examples.xml Fix typo "informations" -> "information" (Atsushi SAKAI and 2008-03-14 11:08:03 +00:00
examples.xsl Remove all trailing blanks; turn on the rule to detect them. 2008-02-05 19:27:37 +00:00
index.html Fix typo "informations" -> "information" (Atsushi SAKAI and 2008-03-14 11:08:03 +00:00
index.py Avoid link errors with "configure --disable-shared". 2008-02-28 17:06:32 +00:00
info1.c convert TAB-based indentation in C sources to use only spaces 2008-04-10 16:54:54 +00:00
Makefile.am Avoid link errors with "configure --disable-shared". 2008-02-28 17:06:32 +00:00
suspend.c convert TAB-based indentation in C sources to use only spaces 2008-04-10 16:54:54 +00:00