qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-discuss] virtio-scsi really slow init with ArchLinux kernel


From: Greg Kurz
Subject: Re: [Qemu-discuss] virtio-scsi really slow init with ArchLinux kernel
Date: Wed, 11 Jul 2018 18:43:05 +0200

On Tue, 10 Jul 2018 08:53:00 -0400
Chris <address@hidden> wrote:

> I'm getting a 15 second delay on every VM boot when using the
> ArchLinux kernel and using the virtio-scsi-pci system.
> 
> QEMU emulator version 2.12.0 running on Arch Linux (4.17.4 kernel),
> booting the same.
> 
> I run qemu like so:
> 
> qemu-system-x86_64 \
>    -nodefaults \
>    -machine type=pc,accel=kvm -smp cores=2,threads=1 -cpu host -vga
> vmware -m 2G \
>    -device virtio-scsi-pci,id=scsi0,num_queues=2 \
>    -drive 
> id=hdroot,file=archlinux.qcow2,if=none,media=disk,cache=unsafe,format=qcow2
> \
>    -device scsi-hd,drive=hdroot
> 
> See the 15 second hang here:
> 
> [    0.577018] scsi host2: Virtio SCSI HBA
> [    0.578413] scsi 2:0:0:0: Direct-Access     QEMU     QEMU HARDDISK
>   2.5+ PQ: 0 ANSI: 5
> [    1.333550] tsc: Refined TSC clocksource calibration: 2800.036 MHz
> [    1.335351] clocksource: tsc: mask: 0xffffffffffffffff max_cycles:
> 0x285c62b0192, max_idle_ns: 440795270636 ns
> [   17.134876] sd 2:0:0:0: Power-on or device reset occurred
> [   17.137683] sd 2:0:0:0: [sda] 104857600 512-byte logical blocks:
> (53.7 GB/50.0 GiB)
> [   17.139845] sd 2:0:0:0: [sda] Write Protect is off
> [   17.140791] sd 2:0:0:0: [sda] Mode Sense: 63 00 00 08
> [   17.140921] sd 2:0:0:0: [sda] Write cache: enabled, read cache:
> enabled, doesn't support DPO or FUA
> [   17.143968]  sda: sda1 sda2
> 
> This is specific to the Arch Linux kernel and the virtio-scsi system.
> IDE boots fast. If I boot an Ubuntu kernel with the exact same
> virtio-scsi settings then there is no delay for the "Power-on or
> device reset occurred" and it boots instantly.
> 
> Anyone know what is going on or what I can do to debug this?
> 
> Thanks
> 

I've been observing a similar delay on ppc64 with fedora28 guests:

# dmesg | egrep 'scsi| sd '
[    1.530946] scsi host0: Virtio SCSI HBA
[    1.532452] scsi 0:0:0:0: Direct-Access     QEMU     QEMU HARDDISK    2.5+ 
PQ: 0 ANSI: 5
[   21.928378] sd 0:0:0:0: Power-on or device reset occurred
[   21.930012] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   21.931554] sd 0:0:0:0: [sda] 83886080 512-byte logical blocks: (42.9 
GB/40.0 GiB)
[   21.931929] sd 0:0:0:0: [sda] Write Protect is off
[   21.933110] sd 0:0:0:0: [sda] Mode Sense: 63 00 00 08
[   21.934084] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, 
doesn't support DPO or FUA
[   21.943566] sd 0:0:0:0: [sda] Attached SCSI disk

Kernel version is 4.16.16-300.fc28.ppc64. And I cannot reproduce the
issue with other distros that have an older kernel, eg, ubuntu 18.04
with kernel 4.15.0-23-generic.

My first guess is that it might be a kernel-side regression introduced
in 4.16... maybe bisect ?

Cheers,

--
Greg



reply via email to

[Prev in Thread] Current Thread [Next in Thread]