From: Paolo Bonzini <pbonzini@redhat.com>
To: Eduardo Habkost <ehabkost@redhat.com>,
Igor Mammedov <imammedo@redhat.com>
Cc: peter.maydell@linaro.org, aliguori@amazon.com,
andre.przywara@amd.com, armbru@redhat.com, mst@redhat.com,
qemu-devel@nongnu.org, agraf@suse.de, qemu-ppc@nongnu.org,
stefanha@redhat.com, lcapitulino@redhat.com, afaerber@suse.de,
gaowanlong@cn.fujitsu.com, rth@twiddle.net
Subject: Re: [Qemu-devel] [PATCH 3/6] NUMA: check if the total numa memory size is equal to ram_size
Date: Wed, 26 Feb 2014 18:28:51 +0100 [thread overview]
Message-ID: <530E2453.4050300@redhat.com> (raw)
In-Reply-To: <20140226171535.GS24353@otherpad.lan.raisama.net>
Il 26/02/2014 18:15, Eduardo Habkost ha scritto:
> On Mon, Feb 17, 2014 at 04:49:44PM +0100, Igor Mammedov wrote:
>> From: Wanlong Gao <gaowanlong@cn.fujitsu.com>
>>
>> If the total number of the assigned numa nodes memory is not
>> equal to the assigned ram size, it will write the wrong data
>> to ACPI table, then the guest will ignore the wrong ACPI table
>> and recognize all memory to one node. It's buggy, we should
>> check it to ensure that we write the right data to ACPI table.
>>
>> Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>> Signed-off-by: Igor Mammedov <imammedo@redhat.com>
>> ---
>> numa.c | 10 ++++++++++
>> 1 files changed, 10 insertions(+), 0 deletions(-)
>>
>> diff --git a/numa.c b/numa.c
>> index 7845036..d12a4f2 100644
>> --- a/numa.c
>> +++ b/numa.c
>> @@ -151,6 +151,16 @@ void set_numa_nodes(void)
>> node_mem[i] = ram_size - usedmem;
>> }
>>
>> + uint64_t numa_total = 0;
>
> I was going to point out that variable declarations in the middle of
> blocks goes against coding style (at least I was told so), but my patch
> to amend CODING_STYLE to document it was ignored for 2 weeks, already.
> So, I am not sure we really have that rule.
>
> (Personally I am not against declaring variables in the middle of
> blocks, I think it makes the code more readable, and it is perfectly
> valid C99 code.)
>
> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
I agree, but I fixed it already.
Paolo
next prev parent reply other threads:[~2014-02-26 17:29 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-17 15:49 [Qemu-devel] [PATCH 0/6] convert -numa to QemuOpts/OptsVisitor Igor Mammedov
2014-02-17 15:49 ` [Qemu-devel] [PATCH 1/6] vl.c: fix style issue Igor Mammedov
2014-02-17 15:49 ` [Qemu-devel] [PATCH 2/6] NUMA: move numa related code to new file numa.c Igor Mammedov
2014-02-26 17:00 ` Eduardo Habkost
2014-02-17 15:49 ` [Qemu-devel] [PATCH 3/6] NUMA: check if the total numa memory size is equal to ram_size Igor Mammedov
2014-02-26 17:15 ` Eduardo Habkost
2014-02-26 17:28 ` Paolo Bonzini [this message]
2014-02-17 15:49 ` [Qemu-devel] [PATCH 4/6] NUMA: Add numa_info structure to contain numa nodes info Igor Mammedov
2014-02-26 16:42 ` Michael S. Tsirkin
2014-02-17 15:49 ` [Qemu-devel] [PATCH 5/6] NUMA: convert -numa option to use OptsVisitor Igor Mammedov
2014-02-17 16:36 ` Eric Blake
2014-02-26 14:40 ` [Qemu-devel] [PATCH v2 " Igor Mammedov
2014-02-26 18:08 ` Eduardo Habkost
2014-02-17 15:49 ` [Qemu-devel] [PATCH 6/6] NUMA: expand MAX_NODES from 64 to 128 Igor Mammedov
2014-02-26 18:40 ` Eduardo Habkost
2014-02-26 16:42 ` [Qemu-devel] [PATCH 0/6] convert -numa to QemuOpts/OptsVisitor Michael S. Tsirkin
2014-02-26 16:53 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=530E2453.4050300@redhat.com \
--to=pbonzini@redhat.com \
--cc=afaerber@suse.de \
--cc=agraf@suse.de \
--cc=aliguori@amazon.com \
--cc=andre.przywara@amd.com \
--cc=armbru@redhat.com \
--cc=ehabkost@redhat.com \
--cc=gaowanlong@cn.fujitsu.com \
--cc=imammedo@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=mst@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=rth@twiddle.net \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).