From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755186AbcESO5J (ORCPT ); Thu, 19 May 2016 10:57:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43805 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754363AbcESO5G (ORCPT ); Thu, 19 May 2016 10:57:06 -0400 Subject: Re: [PATCH v2] KVM: halt-polling: poll if emulated lapic timer will fire soon To: Christian Borntraeger , Wanpeng Li , linux-kernel@vger.kernel.org, kvm@vger.kernel.org References: <1463664426-2991-1-git-send-email-wanpeng.li@hotmail.com> <19abf5c8-7016-45af-f0e6-3bdd161ffb38@redhat.com> <573DD312.4060001@de.ibm.com> Cc: Wanpeng Li , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , David Matlack From: Paolo Bonzini Message-ID: Date: Thu, 19 May 2016 16:56:55 +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: <573DD312.4060001@de.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 19 May 2016 14:57:05 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19/05/2016 16:52, Christian Borntraeger wrote: >> > Would this work too and be simpler? > Hmm, your patch does only fiddle with the grow/shrink logic (which might > be a good idea independently of this change), but the original patch > actually takes into account that we have a guaranteed maximum time by a > wakeup timer - IOW we know exactly what the maximum poll time is. > Yes, it's different. The question is whether a 10us poll (40,000 clock cycles) has an impact even if it's sometimes wrong. Thanks, Paolo