From nobody Wed Dec 31 14:57:18 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92A73C4332F for ; Thu, 2 Nov 2023 15:48:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377054AbjKBPsd (ORCPT ); Thu, 2 Nov 2023 11:48:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377049AbjKBPsc (ORCPT ); Thu, 2 Nov 2023 11:48:32 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73AF1191; Thu, 2 Nov 2023 08:48:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698940106; x=1730476106; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=Vj/umKp6KCEEXAyYuUc1ZRbWwXpcTVXJs6xLHU+IwWA=; b=HqDpr0+Be1Y1EYOgT2TCscxOyoNFwUG/y3rrHXCTKpLwXhEOYYfUCQ6+ /YfN4+U+qrnhHW7l1ffASAzO3C6rmgxaKRdE5FdVHLd3q9TagTcafkW9q 2GHvStVFstDDLUFMJNKxcc2NAHy41CI69/Xc2clGXf+IJHjg5mshCyKQ2 QSkGunOX2b5dKnDlFo57Hup4i/wvOMOzHT/Z98C0J96L+sL9t/B3Tankr zaJkL7+xprlOip0qfSX2ODVL/AxNIHuhlHTtsPFg082vp6kVgPqR7Vlcr i5qqDSRj7wR7WpqhEvd2Ht2m6/CutGOVsWsthEP+IvkOMJ483fLEhUVmL Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10882"; a="368088491" X-IronPort-AV: E=Sophos;i="6.03,271,1694761200"; d="scan'208";a="368088491" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2023 08:48:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10882"; a="878295300" X-IronPort-AV: E=Sophos;i="6.03,271,1694761200"; d="scan'208";a="878295300" Received: from pasangle-nuc10i7fnh.iind.intel.com ([10.223.107.83]) by fmsmga002.fm.intel.com with ESMTP; 02 Nov 2023 08:48:24 -0700 From: Parshuram Sangle To: kvm@vger.kernel.org, pbonzini@redhat.com Cc: linux-kernel@vger.kernel.org, jaishankar.rajendran@intel.com, parshuram.sangle@intel.com Subject: [PATCH 2/2] KVM: documentation update to halt polling Date: Thu, 2 Nov 2023 21:16:28 +0530 Message-Id: <20231102154628.2120-3-parshuram.sangle@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231102154628.2120-1-parshuram.sangle@intel.com> References: <20231102154628.2120-1-parshuram.sangle@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Corrected kvm documentation to reflect current handling of polling interval on successful and un-successful polling events. Also updated the description about newly added halt_poll_ns_grow_start parameter. Co-developed-by: Rajendran Jaishankar Signed-off-by: Rajendran Jaishankar Signed-off-by: Parshuram Sangle --- Documentation/virt/kvm/halt-polling.rst | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/Documentation/virt/kvm/halt-polling.rst b/Documentation/virt/k= vm/halt-polling.rst index 64f32a81133f..cff388d9dc72 100644 --- a/Documentation/virt/kvm/halt-polling.rst +++ b/Documentation/virt/kvm/halt-polling.rst @@ -44,12 +44,14 @@ or in the case of powerpc kvm-hv, in the vcore struct: =20 Thus this is a per vcpu (or vcore) value. =20 -During polling if a wakeup source is received within the halt polling inte= rval, -the interval is left unchanged. In the event that a wakeup source isn't -received during the polling interval (and thus schedule is invoked) there = are -two options, either the polling interval and total block time[0] were less= than -the global max polling interval (see module params below), or the total bl= ock -time was greater than the global max polling interval. +During polling if a wakeup source is not received within the halt polling +interval (and thus schedule is invoked), the interval is always shrunk in +shrink_halt_poll_ns(). In the event that a wakeup source is received during +the polling interval, polling interval is left unchanged if total block ti= me +is below or equal to current interval value otherwise there are two option= s, +either the polling interval and total block time[0] were less than the glo= bal +max polling interval (see module params below), or the total block time was +greater than the global max polling interval. =20 In the event that both the polling interval and total block time were less= than the global max polling interval then the polling interval can be increased= in @@ -79,11 +81,11 @@ adjustment of the polling interval. Module Parameters =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 -The kvm module has 3 tuneable module parameters to adjust the global max -polling interval as well as the rate at which the polling interval is grow= n and -shrunk. These variables are defined in include/linux/kvm_host.h and as mod= ule -parameters in virt/kvm/kvm_main.c, or arch/powerpc/kvm/book3s_hv.c in the -powerpc kvm-hv case. +The kvm module has 4 tunable module parameters to adjust the global max +polling interval, initial value (to grow from 0) as well as the rate at wh= ich +the polling interval is grown and shrunk. These variables are defined in +include/linux/kvm_host.h and as module parameters in virt/kvm/kvm_main.c, = or +arch/powerpc/kvm/book3s_hv.c in the powerpc kvm-hv case. =20 +-----------------------+---------------------------+---------------------= ----+ |Module Parameter | Description | Default Value | --=20 2.17.1