qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] vl: Ensure two functions in the appropriate location
@ 2017-01-17 14:42 Dou Liyang
  2017-01-17 14:42 ` [Qemu-devel] [PATCH 1/2] vl: Ensure the numa_post_machine_init func " Dou Liyang
  2017-01-17 14:42 ` [Qemu-devel] [PATCH 2/2] vl: Ensure the cpu_synchronize_all_post_init " Dou Liyang
  0 siblings, 2 replies; 8+ messages in thread
From: Dou Liyang @ 2017-01-17 14:42 UTC (permalink / raw)
  To: stefanha, ehabkost, pbonzini, armbru, eblake
  Cc: qemu-devel, izumi.taku, caoj.fnst, fanc.fnst, Dou Liyang

I found and try to fix a bug, which shows below.

[Problem]
---------

As I use this command:
./x86_64-softmmu/qemu-system-x86_64 \
	-hda /image/fedora.img \
	-m 1G,slots=4,maxmem=4G \
	-enable-kvm \
	-smp 2,maxcpus=8,sockets=2,cores=2,threads=2 \
	-device qemu64-x86_64-cpu,id=cpu1,socket-id=0,core-id=1,thread-id=0 \
	-device qemu64-x86_64-cpu,id=cpu2,socket-id=0,core-id=1,thread-id=1 \
	-device qemu64-x86_64-cpu,id=cpu3,socket-id=1,core-id=0,thread-id=0 \
	-device qemu64-x86_64-cpu,id=cpu4,socket-id=1,core-id=0,thread-id=1 \
	-device qemu64-x86_64-cpu,id=cpu5,socket-id=1,core-id=1,thread-id=0 \
	-device qemu64-x86_64-cpu,id=cpu6,socket-id=1,core-id=1,thread-id=1 \
	-numa node,nodeid=0,cpus=0-1 \
	-numa node,nodeid=1,cpus=2-3 \
	-numa node,nodeid=2,cpus=4-5 \
	-numa node,nodeid=3,cpus=6-7 \
	-monitor stdio \

In Qemu monitor:

(qemu) info numa

4 nodes
node 0 cpus: 0 1 2 3 4 5 6 7
node 0 size: 256 MB
node 1 cpus:
node 1 size: 256 MB
node 2 cpus:
node 2 size: 256 MB
node 3 cpus:
node 3 size: 256 MB

* It is amazing that the cpus are all in node one. *

Then, I used the "numactl -H" in the guest, and found that the mapping is
right. So I guess it is not big problem, may has some bugs in the initialization.
I followed the initialization process and found it out. 

[Solution]
----------

Ensure the numa_post_machine_init func in the appropriate location.

After the patches:

(qemu) info numa 
4 nodes
node 0 cpus: 0 1
node 0 size: 256 MB
node 1 cpus: 2 3
node 1 size: 256 MB
node 2 cpus: 4 5
node 2 size: 256 MB
node 3 cpus: 6 7
node 3 size: 256 MB

Dou Liyang (2):
  vl: Ensure the numa_post_machine_init func in the appropriate location
  vl: Ensure the cpu_synchronize_all_post_init func in the appropriate
    location

 vl.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

-- 
2.5.5

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

end of thread, other threads:[~2017-01-18 12:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-17 14:42 [Qemu-devel] [PATCH 0/2] vl: Ensure two functions in the appropriate location Dou Liyang
2017-01-17 14:42 ` [Qemu-devel] [PATCH 1/2] vl: Ensure the numa_post_machine_init func " Dou Liyang
2017-01-17 20:09   ` Eduardo Habkost
2017-01-18  4:02     ` Dou Liyang
2017-01-18 12:45       ` Eduardo Habkost
2017-01-17 14:42 ` [Qemu-devel] [PATCH 2/2] vl: Ensure the cpu_synchronize_all_post_init " Dou Liyang
2017-01-17 20:21   ` Eduardo Habkost
2017-01-18  2:17     ` Dou Liyang

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