linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Tang <andy.tang@nxp.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: "rjw@rjwysocki.net" <rjw@rjwysocki.net>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>
Subject: RE: [EXT] Re: Ask for help about cpufreq issue
Date: Tue, 11 Feb 2020 04:20:14 +0000	[thread overview]
Message-ID: <VI1PR04MB4333E6B3340BADBC737E9CFFF3180@VI1PR04MB4333.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <20200207070544.geurecsy4i22xpzl@vireshk-i7>

Hi Viresh,

I checked the clk part, no issue was found.
I did found a odd thing in cpufreq directory.

# cat scaling_available_frequencies
1600000 1000000 800000 500000
# cat scaling_max_freq
500000

Why there is a 1600Mhz frequency available, but the max freq is only 500M?
How the max freq is set?

Thanks,
Andy
> -----Original Message-----
> From: Viresh Kumar <viresh.kumar@linaro.org>
> Sent: 2020年2月7日 15:06
> To: Andy Tang <andy.tang@nxp.com>
> Cc: rjw@rjwysocki.net; linux-pm@vger.kernel.org
> Subject: Re: [EXT] Re: Ask for help about cpufreq issue
> 
> Caution: EXT Email
> 
> On 07-02-20, 06:03, Andy Tang wrote:
> > Hi Viresh,
> >
> > I have tried performance governor, cpu frequency is at the lowest
> frequency.
> > I also tried ondemand governor with high cpu load, cpu frequency doesn't
> increase too.
> >
> > root@localhost:~# cat
> > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
> > performance
> > root@localhost:~# cat
> > /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
> > 1600000 1000000 800000 500000
> > root@localhost:~#
> > root@localhost:~# cat
> > /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
> > 500000
> >
> > root@localhost:~# cat /sys/devices/system/cpu/cpufreq/policy0/stats/*
> > cat: /sys/devices/system/cpu/cpufreq/policy0/stats/reset: Permission
> > denied
> > 1600000 214
> > 1000000 91
> > 800000 82
> > 500000 480088
> > 240
> >    From  :    To
> >          :   1600000   1000000    800000    500000
> >   1600000:         0        15        10        10
> >   1000000:        21         0        22        18
> >    800000:         6        23         0        44
> >    500000:         7        23        41         0
> 
> See, frequencies are getting changed according to this table (at least from
> cpufreq's point of view), which means that cpufreq transitions are passing
> just fine.
> 
> I just had a look at the driver and may have some idea on what's going on.
> The cpufreq driver doesn't program the frequencies, but instead it just
> switches the parent clk for changing the frequency. And when you try to read
> the frequency, all we do is read the frequency from the clk pointer using
> clk_get_rate().
> 
> So, here are the things which can go wrong, in order of how I would like to
> debug them.
> 
> - The frequency of all parent clocks is set to 500 MHz by someone and
>   so clk_get_rate() always report that despite changes to the stats
>   table.
> 
> - clk_set_parent() isn't setting the parent correctly.
> 
> Try putting some print messages to the driver to see if target_index() routine
> is able to set the parent clk properly or not.
> 
> --
> viresh

  reply	other threads:[~2020-02-11  4:20 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-07  5:09 Ask for help about cpufreq issue Andy Tang
2020-02-07  5:23 ` Viresh Kumar
2020-02-07  6:03   ` [EXT] " Andy Tang
2020-02-07  7:05     ` Viresh Kumar
2020-02-11  4:20       ` Andy Tang [this message]
2020-02-11  5:53         ` Viresh Kumar
2020-02-11  6:23           ` Andy Tang
2020-02-11  6:34             ` Viresh Kumar
2020-02-11  7:20               ` Andy Tang
2020-02-12 10:11               ` Andy Tang
2020-02-12 11:50                 ` Viresh Kumar
2020-02-13  8:18                   ` Andy Tang
2020-02-13  8:48                     ` Viresh Kumar
2020-02-13  9:12                       ` Andy Tang
2020-02-13  9:15                         ` Viresh Kumar
2020-02-13  9:21                           ` Andy Tang
2020-02-14 10:00                       ` Andy Tang
2020-02-17  8:22                         ` Viresh Kumar

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=VI1PR04MB4333E6B3340BADBC737E9CFFF3180@VI1PR04MB4333.eurprd04.prod.outlook.com \
    --to=andy.tang@nxp.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=viresh.kumar@linaro.org \
    /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;
as well as URLs for NNTP newsgroup(s).