From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753553AbcEZKa0 (ORCPT ); Thu, 26 May 2016 06:30:26 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:35483 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751787AbcEZKaY (ORCPT ); Thu, 26 May 2016 06:30:24 -0400 Subject: Re: [PATCH v5] KVM: halt-polling: poll for the upcoming fire timers To: Wanpeng Li , linux-kernel@vger.kernel.org, kvm@vger.kernel.org References: <1464144467-6714-1-git-send-email-wanpeng.li@hotmail.com> Cc: Wanpeng Li , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , David Matlack , Christian Borntraeger , Yang Zhang From: Paolo Bonzini Message-ID: <7cac7435-1f65-6a60-e2f5-ed5c285ea0ae@redhat.com> Date: Thu, 26 May 2016 12:30:20 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 26/05/2016 12:26, Paolo Bonzini wrote: > As discussed on IRC, I would like to understand why the adaptive > adjustment of halt_poll_ns is failing. It seems like you have so few > halts that you don't get halt_poll_ns>0. Yet, when the VM halts, it's > very close to the timer tick---often enough for this patch to have an > effect. > > Please send a trace of halt_poll_ns_grow and halt_poll_ns_shrink > tracepoints, so that we can find out more about this. And 30 seconds after I wrote this email, you told me on IRC that the guest had HZ=1000 and the module parameter was set to 1 ms in order to _really_ benefit from the patch. So basically you could obtain the same effect with idle=poll in the guest. This explains why your reported results were not so great (as David noted). Thanks, Paolo