Bug 1270453

Summary: The guest can boot up successful with "threads=0" and without any qemu prompts
Product: Red Hat Enterprise Linux 7 Reporter: Shuang Yu <shuyu>
Component: qemu-kvm-rhevAssignee: Eduardo Habkost <ehabkost>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 7.2CC: hannsj_uhl, huding, juzhang, knoel, michen, qzhang, virt-maint, xfu, zhguo
Target Milestone: rc   
Target Release: 7.3   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-23 23:03:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1308609, 1359843    

Description Shuang Yu 2015-10-10 07:39:35 UTC
Description of problem:
Boot up guest with "-smp 8,sockets=1,cores=1,threads=0",the guest can boot up successful and without any qemu prompts,check the cpu info in the guest,the threads will default defined to 8. But if the qemu can give some friendly prompts will be better. 

Version-Release number of selected component (if applicable):
kernel-3.10.0-322.el7.ppc64le
qemu-kvm-rhev-2.3.0-29.el7.ppc64le
SLOF-20150313-5.gitc89b0df.el7.noarch

How reproducible:
100%

Steps to Reproduce:
1.Boot up the guest with "-smp 8,sockets=1,cores=1,threads=0":

# /usr/libexec/qemu-kvm -name smt -machine pseries,accel=kvm,usb=off -realtime mlock=off -nodefaults -monitor stdio -rtc base=utc -device virtio-scsi-pci,id=scsi -drive file=RHEL-7.2-20151008.0-Server-ppc64le.qcow2,format=qcow2,if=none,id=drive-scsi0,cache=none -device scsi-hd,drive=drive-scsi0,id=disk0,bus=scsi.0 -vnc :10 -msg timestamp=on -usb -device usb-tablet,id=tablet1 -vga std -netdev tap,id=hostnet1,script=/etc/qemu-ifup,vhost=on -device virtio-net-pci,netdev=hostnet1,id=net1,mac=00:54:5a:5f:52:5b -uuid 12ec9ad7-0b46-455b-9eaa-d11bc5fab790 -m 8G -smp 8,sockets=1,cores=1,threads=0
2.
3.

Actual results:

The guest can boot up successful ,and check the cpu info in the guest:
# lscpu
Architecture:          ppc64le
Byte Order:            Little Endian
CPU(s):                8
On-line CPU(s) list:   0-7
Thread(s) per core:    8    ------------------>default define 8
Core(s) per socket:    1
Socket(s):             1
NUMA node(s):          1
Model:                 IBM pSeries (emulated by qemu)
L1d cache:             64K
L1i cache:             32K
NUMA node0 CPU(s):     0-7

# ppc64_cpu --info
Core   0:    0*    1*    2*    3*    4*    5*    6*    7* 


Expected results:
When set "threads=0",the qemu give some friendly prompts will be better. 

Additional info:
Test "-smp 8,sockets=1,cores=1,threads=0" on x86 platform and hit the same issue.

Comment 3 Eduardo Habkost 2016-06-23 23:03:21 UTC
threads=0 is the same as omitting the "threads" option, meaning it will be calculated automatically by QEMU.