qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [Qemu-trivial] [PATCH v6] numa: make 'info numa' take i


From: Markus Armbruster
Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH v6] numa: make 'info numa' take into account hotplugged memory
Date: Mon, 03 Nov 2014 08:56:00 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Michael Tokarev <address@hidden> writes:

> 30.10.2014 11:22, zhanghailiang wrote:
>> Hi Michael,
>> 
>> Can you help applying this patch to -trivial branch?
>> It has been reviewed, and it mainly fix bug for hmp command of 'info numa'.
>> Which i don't know if it should go qemu-stable, for this is not a blocker.
>> 
>> Maybe go trivial branch is a better choice.
>
> And the original patch description is:
>
>>>>>>> When do memory hotplug, if there is numa node, we should add
>>>>>>> the memory size to the corresponding node memory size.
>>>>>>>
>>>>>>> For now, it mainly affects the result of hmp command "info numa".
>
> What does the "for now" means in this context?  Is the patch
> incpmplete somehow and we should expect more code in this
> area/theme?
>
> In the patch we have:
>
> +void query_numa_node_mem(uint64_t *node_mem)
> +{
> +    int i;
> +
> +    if (nb_numa_nodes <= 0) {
> +        return;
> +    }
> +
> +    numa_stat_memory_devices(node_mem);
> +    for (i = 0; i < nb_numa_nodes; i++) {
> +        node_mem[i] += numa_info[i].node_mem;
> +    }
> +}
>
> Please note that while the node_mem is a pointer, it is used as
> an array.  In C, pointers and arrays in this context is the same
> thing, but I think it is better to make the fact that it is an
> array explicit in the function prototype, to be like this:
>
> +void query_numa_node_mem(uint64_t node_mem[])
>
> (But I don't know how various tools like coverity et al will react
> to this.  Gcc and any other C compiler should be fine).
>
> The same stands for other function prototype.
>
> I'm not sure this qualifies as -trivial really.  Yes the change
> does not affect anything but the `info' command, and is rather
> simple, but... I'm not sure.

Fortunately, monitor.c got a maintainer.  Luiz, would you be willing to
shepherd this patch?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]