mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pierre Gondois <pierre.gondois@arm.com>
To: Christian Loehle <christian.loehle@arm.com>,
	"Rafael J. Wysocki" <rafael@kernel.org>
Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linux-pm <linux-pm@vger.kernel.org>,
	Ingo Molnar <mingo@redhat.com>,
	Valentin Schneider <vschneid@redhat.com>
Subject: Re: [PATCH] sched/cpufreq: Ensure sd is rebuilt for EAS check
Date: Wed, 13 Nov 2024 12:53:21 +0100	[thread overview]
Message-ID: <872c894d-1caa-4752-bb6a-08c29f1fb3ad@arm.com> (raw)
In-Reply-To: <35e572d9-1152-406a-9e34-2525f7548af9@arm.com>

I could reproduce the issue on an ACPI/CPPC based platform.

It seems the reason it doesn't work is that for CPPC,
CPUFREQ_HAVE_GOVERNOR_PER_POLICY is not set. So
   kernel/sched/cpufreq_schedutil.c::global_tunables
is set and we don't bail out in sugov_init().

On a system with CPUFREQ_HAVE_GOVERNOR_PER_POLICY set,
the issue is not triggered. sugov_eas_rebuild_sd() is always called.

The patch effectively solved the issue for me.

Regards,
Pierre

On 11/9/24 01:24, Christian Loehle wrote:
> Ensure sugov_eas_rebuild_sd() is always called when sugov_init()
> succeeds. The out goto initialized sugov without forcing the rebuild.
> 
> Previously the missing call to sugov_eas_rebuild_sd() could lead to EAS
> not being enabled on boot when it should have been, because it requires
> all policies to be controlled by schedutil while they might not have
> been initialized yet.
> 
> Fixes: e7a1b32e43b1 ("cpufreq: Rebuild sched-domains when removing cpufreq driver")
> Signed-off-by: Christian Loehle <christian.loehle@arm.com>
> ---
>   kernel/sched/cpufreq_schedutil.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c
> index c6ba15388ea7..28c77904ea74 100644
> --- a/kernel/sched/cpufreq_schedutil.c
> +++ b/kernel/sched/cpufreq_schedutil.c
> @@ -783,9 +783,8 @@ static int sugov_init(struct cpufreq_policy *policy)
>   	if (ret)
>   		goto fail;
>   
> -	sugov_eas_rebuild_sd();
> -
>   out:
> +	sugov_eas_rebuild_sd();
>   	mutex_unlock(&global_tunables_lock);
>   	return 0;
>   

      parent reply	other threads:[~2024-11-13 11:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-09  0:24 Christian Loehle
2024-11-12 20:37 ` Rafael J. Wysocki
2024-11-13 11:53 ` Pierre Gondois [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=872c894d-1caa-4752-bb6a-08c29f1fb3ad@arm.com \
    --to=pierre.gondois@arm.com \
    --cc=christian.loehle@arm.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rafael@kernel.org \
    --cc=vincent.guittot@linaro.org \
    --cc=viresh.kumar@linaro.org \
    --cc=vschneid@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®