lkml.org 
[lkml]   [2023]   [Aug]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 4/7] governors/haltpoll: Drop kvm_para_available() check
On Wed, Aug 9, 2023 at 2:54 PM Mihai Carabas <mihai.carabas@oracle.com> wrote:
>
> From: Joao Martins <joao.m.martins@oracle.com>
>
> This is duplicated already in the haltpoll idle driver,
> and there's no need to re-check KVM guest availability in
> the governor.
>
> Either guests uses the module which explicitly selects this
> governor, and given that it has the lowest rating of all governors
> (menu=20,teo=19,ladder=10/25,haltpoll=9) means that unless it's
> the only one compiled in, it won't be selected.
>
> Dropping such check also allows to test haltpoll in baremetal.

Fair enough.

> Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
> Signed-off-by: Mihai Carabas <mihai.carabas@oracle.com>

Acked-by: Rafael J. Wysocki <rafael@kernel.org>

> ---
> drivers/cpuidle/governors/haltpoll.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/cpuidle/governors/haltpoll.c b/drivers/cpuidle/governors/haltpoll.c
> index 1dff3a52917d..c9b69651d377 100644
> --- a/drivers/cpuidle/governors/haltpoll.c
> +++ b/drivers/cpuidle/governors/haltpoll.c
> @@ -143,10 +143,7 @@ static int haltpoll_enable_device(struct cpuidle_driver *drv,
>
> static int __init init_haltpoll(void)
> {
> - if (kvm_para_available())
> - return cpuidle_register_governor(&haltpoll_governor);
> -
> - return 0;
> + return cpuidle_register_governor(&haltpoll_governor);
> }
>
> postcore_initcall(init_haltpoll);
> --
> 1.8.3.1
>

\
 
 \ /
  Last update: 2023-08-10 21:26    [W:0.130 / U:0.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site