Skip to contentSkip to conversation

tsc=reliable in Linux guests

Qemu-devel Richard W.M. Jones 1 participant 1 message May 13, 2016

lore
Share & tools
lore
#0 lore raw

I was wondering why the Linux kernel was spending 21ms starting up each secondary CPU when we boot it virtualized with qemu -smp >= 2.

It turns out the time was lost in check_tsc_sync_target().

This is easily avoided by using `tsc=reliable' on the command line, saving 63ms when starting a guest with -smp 4 for example.

Is this option safe? If so, why don't we enable it automatically in the kernel when we detect that we are a KVM guest?

Rich.

Signature · 4 lines
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html