In many places we store bitmap info in a chunk of data
(pointed to by a char *), and have redundant codes to
set/unset bits. This series extends virBitmap, and convert
those codes to use virBitmap.
patch 01 is based on
https://www.redhat.com/archives/libvir-list/2012-September/msg00644.html
changes:
v3:
- renaming member variables of virBitmap
- rewrite virBitmapFormat using virBitmapNextSetBit
- store bits in machine native endian format
- more tests of virBitmap
v2:
- fix bug in qemuSetupCgroupForEmulator
- new function virBitmapNextSetBit
- virBitmapcmp -> virBitmapEqual
- virBitmap: store bits in little endian format
- some improvements of virBitmap
- fix some memory leaks
Hu Tao (9):
bitmap: add a new member variable map_len
New functions for virBitmap
use virBitmap to store cpupin info
use virBitmap to store cpu affinity info
use virBitmap to store numa nodemask info.
use virBitmap to store cpumask info.
use virBitmap to store cells' cpumask info.
use virBitmap to store nodeinfo.
remove virDomainCpuSetFormat and virDomainCpuSetParse
.gitignore | 1 +
src/conf/cpu_conf.c | 17 +-
src/conf/cpu_conf.h | 3 +-
src/conf/domain_conf.c | 392 ++++++----------------------------
src/conf/domain_conf.h | 18 +-
src/libvirt_private.syms | 14 +-
src/lxc/lxc_controller.c | 56 +++--
src/nodeinfo.c | 26 +--
src/nodeinfo.h | 6 +-
src/parallels/parallels_driver.c | 5 +-
src/qemu/qemu_cgroup.c | 10 +-
src/qemu/qemu_cgroup.h | 2 +-
src/qemu/qemu_command.c | 43 +---
src/qemu/qemu_driver.c | 168 +++++++--------
src/qemu/qemu_process.c | 141 ++++---------
src/test/test_driver.c | 5 +-
src/util/bitmap.c | 429 ++++++++++++++++++++++++++++++++++++--
src/util/bitmap.h | 34 +++
src/util/processinfo.c | 36 ++--
src/util/processinfo.h | 9 +-
src/vmx/vmx.c | 36 ++--
tests/Makefile.am | 7 +-
tests/cpuset | 2 +-
tests/virbitmaptest.c | 362 ++++++++++++++++++++++++++++++++
24 files changed, 1126 insertions(+), 696 deletions(-)
create mode 100644 tests/virbitmaptest.c
--
1.7.10.2