[libvirt] [PATCH 4/5 v3] numatune: Support numa tuning in qemu driver.

Eric Blake eblake at redhat.com
Wed Jun 22 20:16:12 UTC 2011


On 06/17/2011 04:22 AM, Osier Yang wrote:
> +#if HAVE_NUMACTL
> +static int
> +qemuProcessInitNumaMemoryPolicy(virDomainObjPtr vm)
> +{
> +    struct bitmask *mask = NULL;

> +
> +    if (VIR_ALLOC(mask) < 0) {

On RHEL 5, I'm getting compilation failures:

qemu/qemu_process.c: In function 'qemuProcessInitNumaMemoryPolicy':
qemu/qemu_process.c:1211: error: dereferencing pointer to incomplete type
...
qemu/qemu_process.c:1260: warning: passing argument 1 of
'numa_set_membind' from incompatible pointer type

Where is 'struct bitmask' defined?  It's not in libvirt, so it is
probably a struct leaked by a newer NUMA header, but not available with
older NUMA headers (and if so, it's not very namespace safe, is it).

On RHEL 5, 'man numa_set_membind' shows me:

void numa_set_membind(nodemask_t *nodemask);

On Fedora 14, numa.h has:

typedef struct {
        unsigned long n[NUMA_NUM_NODES/(sizeof(unsigned long)*8)];
} nodemask_t;

struct bitmask {
        unsigned long size; /* number of bits in the map */
        unsigned long *maskp;
};


Sounds like we need to use the various nodemask_* functions (in the
older numa.h, they directly operate on nodemask_t; in the newer numa.h,
they are compatibility wrappers that convert to the newer struct bitmask).

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110622/64b5c648/attachment-0001.sig>


More information about the libvir-list mailing list