public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Chen Yu <yu.c.chen@intel.com>
To: srinivas pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: Len Brown <lenb@kernel.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Wendy Wang <wendy.wang@intel.com>,
	Zhang Rui <rui.zhang@intel.com>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC][PATCH] cpufreq: intel_pstate: Delete intel_pstate sysfs if failed to register the driver
Date: Tue, 13 Oct 2020 14:44:52 +0800	[thread overview]
Message-ID: <20201013064452.GA17226@chenyu-office.sh.intel.com> (raw)
In-Reply-To: <ae351673692472b5ff5a482debc2de9060ffdd5e.camel@linux.intel.com>

Hi Srinivas,
On Mon, Oct 12, 2020 at 06:22:40AM -0700, srinivas pandruvada wrote:
> On Fri, 2020-10-09 at 11:30 +0800, Chen Yu wrote:
> > There is a corner case that if the intel_pstate driver failed to be
> > registered(might be due to invalid MSR access) 
> Do you have logs why it is not loaded? On supported platforms MSRs
> should be invalid.
Unfortunately we don't have the boot up log for now, as it is
a pre-production platform and the low-level simulation(for MSR)
might be unstable.( And there seems to be some environment issue
on pre-production platform to reproduce this issue).
But we can hack the code in intel_pstate to make the driver failed
to be loaded and the issue was reproduced.
> It may be a case when we are trying to bring up pre-production systems
> where some instability in MSRs on certain CPUs. 
> 
> But the patch is correct. We can't have invalid folder when
> intel_pstate is not used. 
> 
> > and with the acpi_cpufreq
> > loaded, the intel_pstate sysfs might still be created, which makes
> > the
> > user confusing(turbostat for example):
> > 
> > grep . /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver
> > acpi-cpufreq
> > 
> > grep . /sys/devices/system/cpu/intel_pstate/*
> > /sys/devices/system/cpu/intel_pstate/max_perf_pct:0
> > /sys/devices/system/cpu/intel_pstate/min_perf_pct:0
> > grep: /sys/devices/system/cpu/intel_pstate/no_turbo: Resource
> > temporarily unavailable
> > grep: /sys/devices/system/cpu/intel_pstate/num_pstates: Resource
> > temporarily unavailable
> > /sys/devices/system/cpu/intel_pstate/status:off
> > grep: /sys/devices/system/cpu/intel_pstate/turbo_pct: Resource
> > temporarily unavailable
> > 
> > The existing of intel_pstate sysfs does not mean that the
> > intel_pstate driver
> > has been successfully loaded(for example, echo off to status), but
> > the
> > intel_pstate sysfs should not co-exist when acpi-cpufreq is also
> > present.
> > Fix this issue by deleting the intel_pstate sysfs if the driver
> > failed
> > to be loaded during bootup.
> > 
> > Reported-by: Wendy Wang <wendy.wang@intel.com>
> > Suggested-by: Zhang Rui <rui.zhang@intel.com>
> > Signed-off-by: Chen Yu <yu.c.chen@intel.com>
> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com
Thanks!


Best,
Chenyu

  reply	other threads:[~2020-10-13  6:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-09  3:30 [RFC][PATCH] cpufreq: intel_pstate: Delete intel_pstate sysfs if failed to register the driver Chen Yu
2020-10-12 13:22 ` srinivas pandruvada
2020-10-13  6:44   ` Chen Yu [this message]
2020-10-16 14:34 ` Rafael J. Wysocki

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=20201013064452.GA17226@chenyu-office.sh.intel.com \
    --to=yu.c.chen@intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=rui.zhang@intel.com \
    --cc=srinivas.pandruvada@linux.intel.com \
    --cc=viresh.kumar@linaro.org \
    --cc=wendy.wang@intel.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