All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali@kernel.org>
To: nnet <nnet@fastmail.fm>
Cc: "Marek Behún" <kabel@kernel.org>,
	a.heider@gmail.com, andrew@lunn.ch, gerald@gk2.net,
	gregory.clement@bootlin.com, kostap@marvell.com,
	linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org,
	linux-kernel@vger.kernel.org, luka.perkov@sartura.hr,
	miquel.raynal@bootlin.com, mturquette@baylibre.com,
	rmk+kernel@armlinux.org.uk, sboyd@kernel.org, tmn505@gmail.com,
	vladimir.vid@sartura.hr
Subject: Re: [PATCH mvebu v2 00/10] Armada 37xx: Fix cpufreq changing base CPU speed to 800 MHz from 1000 MHz
Date: Fri, 12 Feb 2021 00:44:45 +0100	[thread overview]
Message-ID: <20210211234445.hbv2diphmgbir76u@pali> (raw)
In-Reply-To: <1ad78446-4a40-4c3e-8680-6dbf19616515@www.fastmail.com>

On Thursday 11 February 2021 12:22:52 nnet wrote:
> On Thu, Feb 11, 2021, at 11:55 AM, Pali Rohár wrote:
> > On Wednesday 10 February 2021 11:08:59 nnet wrote:
> > > On Wed, Feb 10, 2021, at 10:03 AM, Pali Rohár wrote:
> > > > > > Hello! Could you please enable userspace governor during kernel
> > > > > > compilation?
> > > > > > 
> > > > > >     CONFIG_CPU_FREQ_GOV_USERSPACE=y
> > > > > > 
> > > > > > It can be activated via command:
> > > > > > 
> > > > > >     echo userspace > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
> > > > > > 
> > > > > > After that you can "force" CPU frequency to specific value, e.g.:
> > > > > > 
> > > > > >     echo 1000000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed
> > > > > > 
> > > > > > I need to know which switch (from --> to freq) cause this system hang.
> > > > > > 
> > > > > > This patch series (via MIN_VOLT_MV_FOR_L0_L1_1GHZ) is fixing only
> > > > > > switching from 500 MHz to 1000 MHz on 1 GHz variant. As only this switch
> > > > > > is causing issue.
> > > > > > 
> > > > > > I have used following simple bash script to check that switching between
> > > > > > 500 MHz and 1 GHz is stable:
> > > > > > 
> > > > > >     while true; do
> > > > > >         echo 1000000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed;
> > > > > >         echo 500000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed;
> > > > > >         echo 1000000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed;
> > > > > >         echo 500000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed;
> > > > > >     done
> > > > > 
> > > > > echo userspace | tee /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
> > > > > while true; do
> > > > >   echo 1200000 | tee /sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed;
> > > > >   echo 600000 | tee /sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed;
> > > > > done
> > > > > 
> > > > > >> +#define MIN_VOLT_MV_FOR_L0_L1_1GHZ 1108
> > > > > 
> > > > > With 1108 I get a freeze within a minute. The last output to stdout is 600000.
> > > > > 
> > > > > With 1120 it takes a few minutes.
> > > > > 
> > > > > With any of 1225, 1155, 1132 the device doesn't freeze over the full 5 minute load test.
> > > > > 
> > > > > I'm using ondemand now with the above at 1132 without issue so far.
> > > > 
> > > > Great, thank you for testing!
> > > > 
> > > > Can you check if switching between any two lower frequencies 200000
> > > > 300000 600000 is stable?
> > > 
> > > This is stable using 1132 mV for MIN_VOLT_MV_FOR_L0_L1_1GHZ:
> > > 
> > > while true; do
> > >   # down
> > >   echo 1200000 | tee /sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed;
> > ...
> > 
> > Hello!
> > 
> > Could you please re-run test without tee, in form as I have shown above?
> > UART is slow and printing something to console adds delay which decrease
> > probability that real issue is triggered as this is timing issue.
> 
> The test was done over SSH.

Ok! But it is still better to not print any results as it adds unwanted
delay between frequency switching.

> > Also please do tests just between two frequencies in loop as I observed
> > that switching between more decreased probability to hit issue.
> 
> > > > > echo userspace | tee /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
> > > > > while true; do
> > > > >   echo 1200000 | tee /sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed;
> > > > >   echo 600000 | tee /sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed;
> > > > > done
> 
> The first test ^ switched between 600 MHz and 1.2 GHz.
> 
> > The real issue for 1 GHz variant of A3720 is only when doing switch from
> > 500 MHz to 1 GHz. So could you try to do some tests also without
> > changing MIN_VOLT_MV_FOR_L0_L1_1GHZ and switching just between non-1.2
> > frequencies (to verify that on 1.2 GHz variant it is also from 600 MHz
> > to 1.2 GHz)?
> 
> With 1108 mV and switching between 600 MHz and 1.2GHz, I always saw a freeze within a minute.

I mean to try switching with 1.108 V between 200 MHz and 300 MHz or
between 300 MHz and 600 MHz. To check that issue is really only with
switch from 600 MHz to 1.2 GHz.

I need to know if current settings are fine for 200, 300 and 600 MHz
frequencies and the only 600 --> 1200 needs to be fixed.

WARNING: multiple messages have this Message-ID (diff)
From: "Pali Rohár" <pali@kernel.org>
To: nnet <nnet@fastmail.fm>
Cc: "Marek Behún" <kabel@kernel.org>,
	andrew@lunn.ch, luka.perkov@sartura.hr, sboyd@kernel.org,
	gregory.clement@bootlin.com, a.heider@gmail.com,
	linux-kernel@vger.kernel.org, vladimir.vid@sartura.hr,
	mturquette@baylibre.com, rmk+kernel@armlinux.org.uk,
	tmn505@gmail.com, gerald@gk2.net, miquel.raynal@bootlin.com,
	kostap@marvell.com, linux-clk@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH mvebu v2 00/10] Armada 37xx: Fix cpufreq changing base CPU speed to 800 MHz from 1000 MHz
Date: Fri, 12 Feb 2021 00:44:45 +0100	[thread overview]
Message-ID: <20210211234445.hbv2diphmgbir76u@pali> (raw)
In-Reply-To: <1ad78446-4a40-4c3e-8680-6dbf19616515@www.fastmail.com>

On Thursday 11 February 2021 12:22:52 nnet wrote:
> On Thu, Feb 11, 2021, at 11:55 AM, Pali Rohár wrote:
> > On Wednesday 10 February 2021 11:08:59 nnet wrote:
> > > On Wed, Feb 10, 2021, at 10:03 AM, Pali Rohár wrote:
> > > > > > Hello! Could you please enable userspace governor during kernel
> > > > > > compilation?
> > > > > > 
> > > > > >     CONFIG_CPU_FREQ_GOV_USERSPACE=y
> > > > > > 
> > > > > > It can be activated via command:
> > > > > > 
> > > > > >     echo userspace > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
> > > > > > 
> > > > > > After that you can "force" CPU frequency to specific value, e.g.:
> > > > > > 
> > > > > >     echo 1000000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed
> > > > > > 
> > > > > > I need to know which switch (from --> to freq) cause this system hang.
> > > > > > 
> > > > > > This patch series (via MIN_VOLT_MV_FOR_L0_L1_1GHZ) is fixing only
> > > > > > switching from 500 MHz to 1000 MHz on 1 GHz variant. As only this switch
> > > > > > is causing issue.
> > > > > > 
> > > > > > I have used following simple bash script to check that switching between
> > > > > > 500 MHz and 1 GHz is stable:
> > > > > > 
> > > > > >     while true; do
> > > > > >         echo 1000000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed;
> > > > > >         echo 500000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed;
> > > > > >         echo 1000000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed;
> > > > > >         echo 500000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed;
> > > > > >     done
> > > > > 
> > > > > echo userspace | tee /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
> > > > > while true; do
> > > > >   echo 1200000 | tee /sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed;
> > > > >   echo 600000 | tee /sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed;
> > > > > done
> > > > > 
> > > > > >> +#define MIN_VOLT_MV_FOR_L0_L1_1GHZ 1108
> > > > > 
> > > > > With 1108 I get a freeze within a minute. The last output to stdout is 600000.
> > > > > 
> > > > > With 1120 it takes a few minutes.
> > > > > 
> > > > > With any of 1225, 1155, 1132 the device doesn't freeze over the full 5 minute load test.
> > > > > 
> > > > > I'm using ondemand now with the above at 1132 without issue so far.
> > > > 
> > > > Great, thank you for testing!
> > > > 
> > > > Can you check if switching between any two lower frequencies 200000
> > > > 300000 600000 is stable?
> > > 
> > > This is stable using 1132 mV for MIN_VOLT_MV_FOR_L0_L1_1GHZ:
> > > 
> > > while true; do
> > >   # down
> > >   echo 1200000 | tee /sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed;
> > ...
> > 
> > Hello!
> > 
> > Could you please re-run test without tee, in form as I have shown above?
> > UART is slow and printing something to console adds delay which decrease
> > probability that real issue is triggered as this is timing issue.
> 
> The test was done over SSH.

Ok! But it is still better to not print any results as it adds unwanted
delay between frequency switching.

> > Also please do tests just between two frequencies in loop as I observed
> > that switching between more decreased probability to hit issue.
> 
> > > > > echo userspace | tee /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
> > > > > while true; do
> > > > >   echo 1200000 | tee /sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed;
> > > > >   echo 600000 | tee /sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed;
> > > > > done
> 
> The first test ^ switched between 600 MHz and 1.2 GHz.
> 
> > The real issue for 1 GHz variant of A3720 is only when doing switch from
> > 500 MHz to 1 GHz. So could you try to do some tests also without
> > changing MIN_VOLT_MV_FOR_L0_L1_1GHZ and switching just between non-1.2
> > frequencies (to verify that on 1.2 GHz variant it is also from 600 MHz
> > to 1.2 GHz)?
> 
> With 1108 mV and switching between 600 MHz and 1.2GHz, I always saw a freeze within a minute.

I mean to try switching with 1.108 V between 200 MHz and 300 MHz or
between 300 MHz and 600 MHz. To check that issue is really only with
switch from 600 MHz to 1.2 GHz.

I need to know if current settings are fine for 200, 300 and 600 MHz
frequencies and the only 600 --> 1200 needs to be fixed.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-02-11 23:45 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-09 21:00 [PATCH mvebu v2 00/10] Armada 37xx: Fix cpufreq changing base CPU speed to 800 MHz from 1000 MHz nnet
2021-02-09 21:33 ` Pali Rohár
2021-02-09 21:33   ` Pali Rohár
2021-02-09 21:45   ` nnet
2021-02-09 21:45     ` nnet
2021-02-09 22:42     ` Pali Rohár
2021-02-09 22:42       ` Pali Rohár
2021-02-09 22:52       ` nnet
2021-02-09 22:52         ` nnet
2021-02-09 22:56         ` Pali Rohár
2021-02-09 22:56           ` Pali Rohár
2021-02-09 23:16           ` nnet
2021-02-09 23:16             ` nnet
2021-02-09 23:26             ` Marek Behún
2021-02-09 23:26               ` Marek Behún
2021-02-10  1:31               ` nnet
2021-02-10  1:31                 ` nnet
2021-02-10  1:51                 ` nnet
2021-02-10  1:51                   ` nnet
2021-02-10  2:07                   ` nnet
2021-02-10  2:07                     ` nnet
2021-02-10  9:23                     ` Pali Rohár
2021-02-10  9:23                       ` Pali Rohár
2021-02-10 17:34                       ` nnet
2021-02-10 17:34                         ` nnet
2021-02-10 18:03                         ` Pali Rohár
2021-02-10 18:03                           ` Pali Rohár
2021-02-10 19:08                           ` nnet
2021-02-10 19:08                             ` nnet
2021-02-10 19:18                             ` Marek Behún
2021-02-10 19:18                               ` Marek Behún
2021-02-11 19:55                             ` Pali Rohár
2021-02-11 19:55                               ` Pali Rohár
2021-02-11 20:22                               ` nnet
2021-02-11 20:22                                 ` nnet
2021-02-11 23:44                                 ` Pali Rohár [this message]
2021-02-11 23:44                                   ` Pali Rohár
2021-02-12  0:41                                   ` nnet
2021-02-12  0:41                                     ` nnet
2021-02-13 10:01                                     ` Pali Rohár
2021-02-13 10:01                                       ` Pali Rohár
2021-02-13 18:30                                       ` nnet
2021-02-13 18:30                                         ` nnet
2021-02-14 12:33                                         ` Pali Rohár
2021-02-14 12:33                                           ` Pali Rohár
2021-02-16  5:48                                           ` nnet
2021-02-16  5:48                                             ` nnet
2021-02-16 10:41                                             ` Pali Rohár
2021-02-16 10:41                                               ` Pali Rohár
2021-02-16 16:27                                               ` nnet
2021-02-16 16:27                                                 ` nnet
2021-02-19 19:33                                                 ` Pali Rohár
2021-02-19 19:33                                                   ` Pali Rohár
2021-02-22  3:17                                                   ` nnet
2021-02-22  3:17                                                     ` nnet
2021-02-22  9:51                                                     ` Pali Rohár
2021-02-22  9:51                                                       ` Pali Rohár
2021-02-22 16:36                                                       ` nnet
2021-02-22 16:36                                                         ` nnet
2021-02-22 16:40                                                         ` Philip Soares
2021-02-22 16:40                                                           ` Philip Soares
2021-02-10  2:12                   ` Marek Behún
2021-02-10  2:12                     ` Marek Behún
  -- strict thread matches above, loose matches on Subject: below --
2021-01-14 12:40 Pali Rohár
2021-01-14 12:40 ` Pali Rohár
2021-02-01 14:35 ` Tomasz Maciej Nowak
2021-02-01 14:35   ` Tomasz Maciej Nowak
2021-02-03 19:29 ` Anders Trier Olesen
2021-02-03 19:29   ` Anders Trier Olesen

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=20210211234445.hbv2diphmgbir76u@pali \
    --to=pali@kernel.org \
    --cc=a.heider@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=gerald@gk2.net \
    --cc=gregory.clement@bootlin.com \
    --cc=kabel@kernel.org \
    --cc=kostap@marvell.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luka.perkov@sartura.hr \
    --cc=miquel.raynal@bootlin.com \
    --cc=mturquette@baylibre.com \
    --cc=nnet@fastmail.fm \
    --cc=rmk+kernel@armlinux.org.uk \
    --cc=sboyd@kernel.org \
    --cc=tmn505@gmail.com \
    --cc=vladimir.vid@sartura.hr \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.