From patchwork Wed Sep 13 14:39:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 813479 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xskq80GDQz9sNr for ; Thu, 14 Sep 2017 00:40:36 +1000 (AEST) Received: from localhost ([::1]:42892 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ds8qA-0003Bv-5c for incoming@patchwork.ozlabs.org; Wed, 13 Sep 2017 10:40:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43198) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ds8po-0003AT-J5 for qemu-devel@nongnu.org; Wed, 13 Sep 2017 10:40:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ds8pj-0001Mq-2S for qemu-devel@nongnu.org; Wed, 13 Sep 2017 10:40:12 -0400 Received: from mx2.suse.de ([195.135.220.15]:35552 helo=mx1.suse.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ds8pi-0001Lf-S7 for qemu-devel@nongnu.org; Wed, 13 Sep 2017 10:40:07 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 41D66AB1E; Wed, 13 Sep 2017 14:40:03 +0000 (UTC) From: Alexander Graf To: qemu-devel@nongnu.org Date: Wed, 13 Sep 2017 16:39:58 +0200 Message-Id: <20170913143958.86385-1-agraf@suse.de> X-Mailer: git-send-email 2.12.3 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-Received-From: 195.135.220.15 Subject: [Qemu-devel] [PATCH] target-i386: enable kvm_pv_unhalt by default X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Andrew Jones , Eduardo Habkost , =?utf-8?q?Andreas_F=C3=A4rber?= , Richard Henderson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Commit f010bc643a (target-i386: add feature kvm_pv_unhalt) introduced the kvm_pv_unhalt feature but didn't enable it by default. Without kvm_pv_unhalt we see a measurable degradation in scheduling performance, so enabling it by default does make sense IMHO. This patch just flips it to default to on by default. [With kvm_pv_unhalt disabled] $ perf bench sched messaging -l 10000 Total time: 8.573 [sec] [With kvm_pv_unhalt enabled] $ perf bench sched messaging -l 10000 Total time: 4.416 [sec] Signed-off-by: Alexander Graf --- Let's ask everyone who was involved back then whether this is a feature that is good to enable by default. My measurements imply so, but who knows... Also, I'd kindly like to ask for guidance on how to make this reasonably well backwards compatible. I assume we only want to flip the default in newer machine models? If so, how? --- target/i386/cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 69676e13e1..c58f4ab24f 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -1581,6 +1581,7 @@ static PropValue kvm_default_props[] = { { "kvm-asyncpf", "on" }, { "kvm-steal-time", "on" }, { "kvm-pv-eoi", "on" }, + { "kvm-pv-unhalt", "on" }, { "kvmclock-stable-bit", "on" }, { "x2apic", "on" }, { "acpi", "off" },