qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] issue about numa configure
@ 2018-07-19  9:21 linzhecheng
  2018-07-20 19:44 ` Eduardo Habkost
  0 siblings, 1 reply; 2+ messages in thread
From: linzhecheng @ 2018-07-19  9:21 UTC (permalink / raw)
  To: ehabkost@redhat.com, qemu-devel@nongnu.org, Paolo Bonzini
  Cc: weifuqiang, wangxin (U)

Hi, all
I found that qemu has a constraint in function numa_node_parse now:
     If (node->has_memdev != have_memdevs) {
         Error_setg(errp, "qemu: memdev option must be specified for either "
                    "all or no nodes");
         Return;
     }
This restricts us from being able to configure an empty numa node (without memory and cpus). But if I delete these codes, I can start a VM with cmdline:
qemu-system-x86_64 --enable-kvm  -m size=2G,slots=256,maxmem=300G -smp 2,maxcpus=4,sockets=4,cores=1,threads=1 -numa node,nodeid=0,cpus=0-1,mem=2048 -numa node,nodeid=1,cpus=2-3 ...
We can see only one numa node inside the VM(I have tested both linux and windows) after beginning.
And if I hot-plug the dimm memory devices into the empty node, vm will present a new numa node inside and the new memory is online then.
I'm wondering if you have any related issue before? Or can we remove this constraint?
Looking forward to your answers, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] issue about numa configure
  2018-07-19  9:21 [Qemu-devel] issue about numa configure linzhecheng
@ 2018-07-20 19:44 ` Eduardo Habkost
  0 siblings, 0 replies; 2+ messages in thread
From: Eduardo Habkost @ 2018-07-20 19:44 UTC (permalink / raw)
  To: linzhecheng; +Cc: qemu-devel@nongnu.org, Paolo Bonzini, weifuqiang, wangxin (U)

Hi,

On Thu, Jul 19, 2018 at 09:21:36AM +0000, linzhecheng wrote:
> Hi, all
> I found that qemu has a constraint in function numa_node_parse now:
>      If (node->has_memdev != have_memdevs) {
>          Error_setg(errp, "qemu: memdev option must be specified for either "
>                     "all or no nodes");
>          Return;
>      }
> This restricts us from being able to configure an empty numa node (without memory and cpus). But if I delete these codes, I can start a VM with cmdline:
> qemu-system-x86_64 --enable-kvm  -m size=2G,slots=256,maxmem=300G -smp 2,maxcpus=4,sockets=4,cores=1,threads=1 -numa node,nodeid=0,cpus=0-1,mem=2048 -numa node,nodeid=1,cpus=2-3 ...
> We can see only one numa node inside the VM(I have tested both linux and windows) after beginning.
> And if I hot-plug the dimm memory devices into the empty node, vm will present a new numa node inside and the new memory is online then.
> I'm wondering if you have any related issue before? Or can we remove this constraint?
> Looking forward to your answers, thanks.

The check is there because memory_region_allocate_system_memory()
doesn't know how to allocate memory correctly if only some nodes
use memdev.

I wouldn't remove the check completely, but just skip it if
"mem=0" is specified explicitly.

-- 
Eduardo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-07-20 19:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-19  9:21 [Qemu-devel] issue about numa configure linzhecheng
2018-07-20 19:44 ` Eduardo Habkost

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).