From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Hildenbrand Subject: Re: [PATCH 1/1] KVM: halt_polling: provide a way to qualify wakeups during poll Date: Tue, 3 May 2016 14:41:23 +0200 Message-ID: <20160503144123.1b14d174@thinkpad-w530> References: <1462279041-17028-1-git-send-email-borntraeger@de.ibm.com> <1462279041-17028-2-git-send-email-borntraeger@de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Paolo Bonzini , Radim =?UTF-8?B?S3LEjW3DocWZ?= , KVM , Cornelia Huck , linux-s390 , Jens Freimann , Wanpeng Li , David Matlack To: Christian Borntraeger Return-path: Received: from e06smtp12.uk.ibm.com ([195.75.94.108]:38235 "EHLO e06smtp12.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932687AbcECMle (ORCPT ); Tue, 3 May 2016 08:41:34 -0400 Received: from localhost by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 3 May 2016 13:41:33 +0100 In-Reply-To: <1462279041-17028-2-git-send-email-borntraeger@de.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: > Some wakeups should not be considered a sucessful poll. For example on > s390 I/O interrupts are usually floating, which means that _ALL_ CPUs > would be considered runnable - letting all vCPUs poll all the time for > transactional like workload, even if one vCPU would be enough. > This can result in huge CPU usage for large guests. > This patch lets architectures provide a way to qualify wakeups if they > should be considered a good/bad wakeups in regard to polls. > > For s390 the implementation will fence of halt polling for anything but > known good, single vCPU events. The s390 implementation for floating > interrupts does a wakeup for one vCPU, but the interrupt will be delivered > by whatever CPU checks first for a pending interrupt. We prefer the > woken up CPU by marking the poll of this CPU as "good" poll. > This code will also mark several other wakeup reasons like IPI or > expired timers as "good". This will of course also mark some events as > not sucessful. As KVM on z runs always as a 2nd level hypervisor, > we prefer to not poll, unless we are really sure, though. > > This patch successfully limits the CPU usage for cases like uperf 1byte > transactional ping pong workload or wakeup heavy workload like OLTP > while still providing a proper speedup. > > This also introduced a new vcpu stat "halt_poll_no_tuning" that marks > wakeups that are considered not good for polling. > > Signed-off-by: Christian Borntraeger > Cc: David Matlack > Cc: Wanpeng Li > --- You can keep my Acked-by: David Hildenbrand David