From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Borntraeger Subject: Re: [PATCH] KVM: disable halt_poll_ns as default for s390x Date: Fri, 18 Sep 2015 12:54:22 +0200 Message-ID: <55FBED5E.4060600@de.ibm.com> References: <1442572493-51400-1-git-send-email-dahi@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Cc: pbonzini@redhat.com, wanpeng.li@hotmail.com, dmatlack@google.com, rkrcmar@redhat.com To: David Hildenbrand , kvm@vger.kernel.org Return-path: Received: from e06smtp05.uk.ibm.com ([195.75.94.101]:56735 "EHLO e06smtp05.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752436AbbIRKy2 (ORCPT ); Fri, 18 Sep 2015 06:54:28 -0400 Received: from /spool/local by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 18 Sep 2015 11:54:26 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id D714E1B0804B for ; Fri, 18 Sep 2015 11:56:05 +0100 (BST) Received: from d06av07.portsmouth.uk.ibm.com (d06av07.portsmouth.uk.ibm.com [9.149.37.248]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t8IAsN3441156708 for ; Fri, 18 Sep 2015 10:54:23 GMT Received: from d06av07.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av07.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t8IAsM9R003720 for ; Fri, 18 Sep 2015 04:54:23 -0600 In-Reply-To: <1442572493-51400-1-git-send-email-dahi@linux.vnet.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: Am 18.09.2015 um 12:34 schrieb David Hildenbrand: > We observed some performance degradation on s390x with dynamic > halt polling. Until we can provide a proper fix, let's enable > halt_poll_ns as default only for supported architectures. > > Architectures are now free to set their own halt_poll_ns > default value. > > Signed-off-by: David Hildenbrand > --- [...] > diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c > index eb4c9d2..a447c8c 100644 > --- a/virt/kvm/kvm_main.c > +++ b/virt/kvm/kvm_main.c > @@ -66,8 +66,8 @@ > MODULE_AUTHOR("Qumranet"); > MODULE_LICENSE("GPL"); > > -/* halt polling only reduces halt latency by 5-7 us, 500us is enough */ > -static unsigned int halt_poll_ns = 500000; > +/* Architectures should define their poll value according to the halt latency */ > +static unsigned int halt_poll_ns = KVM_HALT_POLL_NS_DEFAULT; Yes, I prefer this over disabling it via Kconfig. There are benchmarks which benefit from polling on s390. Furthermore it seems that the latency strongly depends on timing of the architecture so making it per arch is probably the right thing to do. Acked-by: Christian Borntraeger > module_param(halt_poll_ns, uint, S_IRUGO | S_IWUSR); > > /* Default doubles per-vcpu halt_poll_ns. */ >