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: 112454 Delivered-To: patch@linaro.org Received: by 10.80.202.13 with SMTP id d13csp1008746edi; Wed, 13 Sep 2017 07:40:26 -0700 (PDT) X-Google-Smtp-Source: AOwi7QCeWgDsgaVipDEhrlTQ9HBtJiyzByGCpvpx/MkORMDKr75dAEMZtkYX8ZxQ9vVZ2T10sNL4 X-Received: by 10.200.43.6 with SMTP id 6mr27683422qtu.105.1505313626224; Wed, 13 Sep 2017 07:40:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505313626; cv=none; d=google.com; s=arc-20160816; b=uqmy6Ia9OY0rIh73PbZwR/sPdA6zwllupw6t2DqFhjQJxkY7J+mbUXY+KVsmN9T8D0 MeBDHbBREa3cVwCw+qXxltmcx4JrkuJqQln1al6LeiczkU774QFOk0k0ddd047BtgziO FvTvNI5s0zpAhGFm04QQwqhPnGcNHeDKg9cLDU8DmxVchHzEb6JEbxYttEpoKe/cCPSS v3BdCPC3UjYvI37iZUllZhLY9WXlvAUDDNxBX3bs5D68mtI9aRSqvzLsGynUXVvvm4qm WDkd5O2fLOlxWBiCUlNt1mWhEKA+Aski58FaYQpR4Pr9JNP63N2LFqUTekxdfn5MqBNR /2GQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:message-id:date:to:from :arc-authentication-results; bh=8l9H7lKxLmQbG46NjrCWC4imVHceLyQWMGW8M1Sz9J0=; b=M0FFuYC4rOOo1v+TwGJRVHceFDpuQzONy8NJR8idrDQIs7QH6C6twFVQR5YG+CJoRH N27nT6tCuA6Fcxn5nkxgnKoVKSVNDm30SDOSJMDbPbJyvSN4Q/cyRIi94ddnsgTKx9Ye ZwLDtMQBaTBu9ohsYiZW6kYMXCfmYku30qYaqv7+7WtlXmr8F43kXblBZWMy5dHbuKO0 dzFZ7WhWC6ayE3+cPJ5q0Vf+d8AMB5yhEUqW8HtBFPfOno2AtuwDkFSORVFfENBfcSBS 7LlcTkqM28XV1t5z+FPapXIMY2Laip08tO7qTh9YJiriPg4p74kpeXavM9nYmpIxaXvs 4EtA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id t6si4632296qkt.210.2017.09.13.07.40.25 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 13 Sep 2017 07:40:26 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org Received: from localhost ([::1]:42892 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ds8pz-0003Bv-PG for patch@linaro.org; Wed, 13 Sep 2017 10:40:23 -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+patch=linaro.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(+) -- 2.12.3 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" },