From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754919AbbIPKPb (ORCPT ); Wed, 16 Sep 2015 06:15:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51729 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754033AbbIPKP1 (ORCPT ); Wed, 16 Sep 2015 06:15:27 -0400 Subject: Re: [PATCH] KVM: add halt_attempted_poll to VCPU stats To: Christian Borntraeger , linux-kernel@vger.kernel.org, kvm@vger.kernel.org References: <1442334477-35377-1-git-send-email-pbonzini@redhat.com> <55F9409B.9020501@de.ibm.com> Cc: rkrcmar@redhat.com, David Hildenbrand , David Matlack , Jens Freimann From: Paolo Bonzini Message-ID: <55F9413A.8000006@redhat.com> Date: Wed, 16 Sep 2015 12:15:22 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <55F9409B.9020501@de.ibm.com> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16/09/2015 12:12, Christian Borntraeger wrote: > I am looking into a case right now, where auto polling goes > completely nuts on my system: > > guest1: 8vcpus guest2: 1 vcpu > iperf with 25 process (-P25) from guest1 to guest2. > > I/O interrupts on s390 are floating (pending on all CPUs) so on > ALL VCPUs that go to sleep, polling will consider any pending > network interrupt as successful poll. So with auto polling the > guest consumes up to 5 host CPUs without auto polling only 1. > Reducing halt_poll_ns to 100000 seems to work (goes back to > 1 cpu). > > The proper way might be to feedback the result of the > interrupt dequeue into the heuristics. Don't know yet how > to handle that properly. I think it's simplest to disable halt_poll_ns by default on s390. On x86, for example, you can mark interrupts so that they _can_ be delivered to all CPUs but only one will get it. You can add a Kconfig symbol for that to other architectures, and not s390. Paolo