Skip to contentSkip to conversation

Request to enable SMP and virtio for qemux86/x86-64

PATCH Zhai, Edwin 2 participants 5 messages Jan 11, 2012 – Jan 26, 2012

lore
Share & tools
lore
#0 lore raw

Bruce,
Can we enable SMP and virtio by default for qemux86/x86-64? This can achieve huge perf boost for workload inside qemu. E.g. we enabled self-hosted image, where we build yocto inside qemu.

Attached patch showes the kernel config option.

Is it reasonable?

Thanks,
Edwin

Signature · 2 lines
best rgds,
edwin

commit 8f2268237c5cb97052c2c9a6ea6c0f818d1a658d

Author: gzhai <gzhai@gzhai-xps.(none)>
Date:   Fri Dec 9 10:32:50 2011 +0800

linux-yocto: enable smp for qemux86

Signed-off-by None <None>
meta/recipes-kernel/linux/linux-yocto/extra.cfg new file +7 -0
new file mode 100644
index 0000000..efe1d9b
@@ -0,0 +1,7 @@
+CONFIG_SMP=y
+CONFIG_VIRTIO=y
+CONFIG_VIRTIO_PCI=y
+CONFIG_VIRTIO_BALLOON=y
+CONFIG_VIRTIO_RING=y
+CONFIG_VIRTIO_NET=y
+CONFIG_VIRTIO_BLK=y
meta/recipes-kernel/linux/linux-yocto_3.0.bb +3 -1
index 4032567..850310a 100644
@@ -20,11 +20,13 @@ SRCREV_machine_qemux86-64 ?= "988fcbe64829f0a03ccfcc08d45cedb26cabe9ed"
 SRCREV_machine ?= "ab1de8c21d2b1d084b8488496d75cc54fcd94f02"
 SRCREV_meta ?= "67ce7623909cef63927fd145026aaf371cf4abf1"
 
-PR = "r2"
+PR = "r3"
 PV = "${LINUX_VERSION}+git${SRCPV}"
 
 SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.0;protocol=git;nocheckout=1;branch=${KBRANCH},meta;name=machine,meta"
 
+SRC_URI += "file://extra.cfg"
+
 COMPATIBLE_MACHINE = "(qemuarm|qemux86|qemuppc|qemumips|qemux86-64)"
 
 # Functionality flags
#1 lore raw
Quoted 8 lines · Edwin

Bruce,
Can we enable SMP and virtio by default for qemux86/x86-64? This can achieve huge perf boost for workload inside qemu. E.g. we enabled self-hosted image, where we build yocto inside qemu.

Attached patch showes the kernel config option.

Is it reasonable?

It should be. I just need to look at the fallback modes, and how this impacts different host systems. That being said, I've run with similar configs in the past (depending on the workload) with no issues.

qemux8-64 is already SMP, so it would just need the addition of virtio devices, which just means we'd look at this as any BSP/target config update.

But with graceful degradation (i.e maxcpus with SMP set) and agreement that we'd like to simulate SMP by default, then we can make the change and I'll merge it into the base config for the target and pull it into the kernel tree.

Cheers,

Bruce

Quoted 4 lines

Thanks,
Edwin

#2 lore raw

Bruce,
Thanks for your efforts!

Edwin

Quoted 37 lines · Bruce Ashfield
Quoted 10 lines · Edwin

Bruce,
Can we enable SMP and virtio by default for qemux86/x86-64? This can achieve
huge perf boost for workload inside qemu. E.g. we enabled self-hosted image,
where we build yocto inside qemu.

Attached patch showes the kernel config option.

Is it reasonable?

It should be. I just need to look at the fallback modes, and how this impacts different host systems. That being said, I've run with similar configs in the past (depending on the workload) with no issues.

qemux8-64 is already SMP, so it would just need the addition of virtio devices, which just means we'd look at this as any BSP/target config update.

But with graceful degradation (i.e maxcpus with SMP set) and agreement that we'd like to simulate SMP by default, then we can make the change and I'll merge it into the base config for the target and pull it into the kernel tree.

Cheers,

Bruce

Quoted 4 lines

Thanks,
Edwin

#3 lore raw
Quoted 2 lines · Edwin

Bruce,
Thanks for your efforts!

FYI: I haven't forgotten about this, I'm just reworking a few things with the 3.2 kernel tree, and will include this as part of that effort. It will all be available soon.

Bruce

Quoted 42 lines

Edwin

Quoted 37 lines · Bruce Ashfield
Quoted 10 lines · Edwin

Bruce,
Can we enable SMP and virtio by default for qemux86/x86-64? This can achieve
huge perf boost for workload inside qemu. E.g. we enabled self-hosted image,
where we build yocto inside qemu.

Attached patch showes the kernel config option.

Is it reasonable?

It should be. I just need to look at the fallback modes, and how this impacts different host systems. That being said, I've run with similar configs in the past (depending on the workload) with no issues.

qemux8-64 is already SMP, so it would just need the addition of virtio devices, which just means we'd look at this as any BSP/target config update.

But with graceful degradation (i.e maxcpus with SMP set) and agreement that we'd like to simulate SMP by default, then we can make the change and I'll merge it into the base config for the target and pull it into the kernel tree.

Cheers,

Bruce

Quoted 4 lines

Thanks,
Edwin

#4 lore raw
Quoted 7 lines · Bruce Ashfield
Quoted 2 lines · Edwin

Bruce,
Thanks for your efforts!

FYI: I haven't forgotten about this, I'm just reworking a few things with the 3.2 kernel tree, and will include this as part of that effort. It will all be available soon.

FYI: I've been testing this with both an updated 3.0 and 3.2 kernel for the 1.2 release and it seems to cause no issues.

I've made the changes in the repos, and when my 1.2 pull request comes out for these two trees (in the next day or so), this will be done.

Cheers,

Bruce

Quoted 50 lines

Bruce

Quoted 42 lines

Edwin

Quoted 37 lines · Bruce Ashfield
Quoted 10 lines · Edwin

Bruce,
Can we enable SMP and virtio by default for qemux86/x86-64? This can achieve
huge perf boost for workload inside qemu. E.g. we enabled self-hosted image,
where we build yocto inside qemu.

Attached patch showes the kernel config option.

Is it reasonable?

It should be. I just need to look at the fallback modes, and how this impacts different host systems. That being said, I've run with similar configs in the past (depending on the workload) with no issues.

qemux8-64 is already SMP, so it would just need the addition of virtio devices, which just means we'd look at this as any BSP/target config update.

But with graceful degradation (i.e maxcpus with SMP set) and agreement that we'd like to simulate SMP by default, then we can make the change and I'll merge it into the base config for the target and pull it into the kernel tree.

Cheers,

Bruce

Quoted 4 lines

Thanks,
Edwin

_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto