From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933532AbbBIJHF (ORCPT ); Mon, 9 Feb 2015 04:07:05 -0500 Received: from mail-wi0-f182.google.com ([209.85.212.182]:42725 "EHLO mail-wi0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932681AbbBIJHD (ORCPT ); Mon, 9 Feb 2015 04:07:03 -0500 Message-ID: <54D878AF.5050707@redhat.com> Date: Mon, 09 Feb 2015 10:06:55 +0100 From: Paolo Bonzini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Xiao Guangrong , linux-kernel@vger.kernel.org, kvm@vger.kernel.org CC: riel@redhat.com, mtosatti@redhat.com, rkrcmar@redhat.com, jan.kiszka@siemens.com, dmatlack@google.com Subject: Re: [PATCH] kvm: add halt_poll_ns module parameter References: <1423226937-11169-1-git-send-email-pbonzini@redhat.com> <54D86E2D.8010808@linux.intel.com> In-Reply-To: <54D86E2D.8010808@linux.intel.com> 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 09/02/2015 09:22, Xiao Guangrong wrote: > > > On 02/06/2015 08:48 PM, Paolo Bonzini wrote: > >> >> +unsigned int halt_poll_ns = 0; >> +module_param(halt_poll_ns, uint, S_IRUGO | S_IWUSR); >> + > > Can we make this parameter be changeable? So that we can tune it > on the fly. It is changeable (S_IWUSR). >> finish_wait(&vcpu->wq, &wait); >> + cur = ktime_get(); > > We can move this into the tracepoint to avoid the workload if the > tracepoint is not enabled. You have a point. I didn't do it because I expect that halt_poll_ns will be always enabled as soon as it auto-tunes, and in that case you'll always have to do the ktime_get() for autotuning purposes. > Otherwise looks good to me. > > Reviewed-by: Xiao Guangrong Thanks! Paolo