From patchwork Fri Jan 26 16:41:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Victor Tapia X-Patchwork-Id: 866486 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 3zSl6P1zhKz9s8J; Sat, 27 Jan 2018 03:41:33 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1ef74D-0003iM-4q; Fri, 26 Jan 2018 16:41:29 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1ef74C-0003hx-0L for kernel-team@lists.ubuntu.com; Fri, 26 Jan 2018 16:41:28 +0000 Received: from mail-wm0-f71.google.com ([74.125.82.71]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1ef74B-0002DM-P7 for kernel-team@lists.ubuntu.com; Fri, 26 Jan 2018 16:41:27 +0000 Received: by mail-wm0-f71.google.com with SMTP id c142so6058805wmh.4 for ; Fri, 26 Jan 2018 08:41:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=56fI432vlNHoC2gVP/Nrm2YIAzmHETF52ULJB+oc3Uw=; b=emIYZB9BgMpSg4FCftfmden1OFuyph2wTEyofRy+w1GPQnqEKnnWjYP5/Ff8Fu8apd irIgsSaPk+R4JA3EwHuTaLk9yitTJiy0J5fj2WLUgAIPjG/Se/qIx6hUI3gIsVnZV7Cc QNiL1MIsVuf+7xC3DYkC7GdxcxuYcWtoPUkHx4sH85c7stuqAuwxKRc4ihjI9xKpl0T5 jw2/lDtxNM4xGw4FNK6Tdo7J66zfTJNNUnvSAURwY7bFNTcAouepOjDCfodFhDuuhh1Y bKG8aGIrM3MTo7P+k0XYA2RgKNIeALPxZ05akEua7E3mLcDEkwsI5zrefWA5Rp+N0/8W FKYA== X-Gm-Message-State: AKwxytcKcC/TeXcgaWpFJ3gi+PbVuYLQMTxXZmjVPCIs4La7g1ESWU1T L6wP3pA+Kjb/UcbHYwQta0W9zRatbJHGxeWB7W12YKxL01iklIGSGJJk+hDF17hOezN/ja2SRc/ 4ekZM02FL8J9C1JgNoooScUq4vtKUAY8YgHNf5C151Q== X-Received: by 10.28.239.19 with SMTP id n19mr10967168wmh.20.1516984887368; Fri, 26 Jan 2018 08:41:27 -0800 (PST) X-Google-Smtp-Source: AH8x225fP9BN+OOjy9o/gkIY8b2jfZa4hRkNMeWh4jjA1J973XFbRr2T+6/GC51/lvs+Lp26g18/Aw== X-Received: by 10.28.239.19 with SMTP id n19mr10967162wmh.20.1516984887236; Fri, 26 Jan 2018 08:41:27 -0800 (PST) Received: from Go.mystuff.cu (117.6.77.188.dynamic.jazztel.es. [188.77.6.117]) by smtp.gmail.com with ESMTPSA id p19sm7472801wrg.74.2018.01.26.08.41.26 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 26 Jan 2018 08:41:26 -0800 (PST) From: Victor Tapia To: kernel-team@lists.ubuntu.com Subject: [PATCH][SRU][Xenial] KVM: x86: lower default for halt_poll_ns Date: Fri, 26 Jan 2018 17:41:24 +0100 Message-Id: <1516984884-488-2-git-send-email-victor.tapia@canonical.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516984884-488-1-git-send-email-victor.tapia@canonical.com> References: <1516984884-488-1-git-send-email-victor.tapia@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Paolo Bonzini BugLink: https://bugs.launchpad.net/bugs/1724614 In some fio benchmarks, halt_poll_ns=400000 caused CPU utilization to increase heavily even in cases where the performance improvement was small. In particular, bandwidth divided by CPU usage was as much as 60% lower. To some extent this is the expected effect of the patch, and the additional CPU utilization is only visible when running the benchmarks. However, halving the threshold also halves the extra CPU utilization (from +30-130% to +20-70%) and has no negative effect on performance. Signed-off-by: Paolo Bonzini Signed-off-by: Radim Krčmář (backported from commit b401ee0b85a53e89739ff68a5b1a0667d664afc9) Signed-off-by: Victor Tapia Acked-by: Colin Ian King --- arch/x86/include/asm/kvm_host.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index 40be363..4028beb 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -42,7 +42,7 @@ #define KVM_PIO_PAGE_OFFSET 1 #define KVM_COALESCED_MMIO_PAGE_OFFSET 2 -#define KVM_HALT_POLL_NS_DEFAULT 400000 +#define KVM_HALT_POLL_NS_DEFAULT 200000 #define KVM_IRQCHIP_NUM_PINS KVM_IOAPIC_NUM_PINS