From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39588) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b1A80-0007SC-RD for qemu-devel@nongnu.org; Fri, 13 May 2016 06:15:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b1A7w-0001HS-2u for qemu-devel@nongnu.org; Fri, 13 May 2016 06:15:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38871) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b1A7v-0001HO-Th for qemu-devel@nongnu.org; Fri, 13 May 2016 06:15:24 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D9FBB90E45 for ; Fri, 13 May 2016 10:15:22 +0000 (UTC) Received: from localhost (ovpn-204-25.brq.redhat.com [10.40.204.25]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u4DAFLYo026476 for ; Fri, 13 May 2016 06:15:22 -0400 Date: Fri, 13 May 2016 11:15:21 +0100 From: "Richard W.M. Jones" Message-ID: <20160513101521.GD728@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] tsc=reliable in Linux guests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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. -- 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