All of lore.kernel.org
 help / color / mirror / Atom feed
* Can't enable/switch to 'schedutil' governor with kernel 4.7.2 ?
@ 2016-08-23 16:25 lists
  2016-08-23 21:23 ` Doug Smythies
  0 siblings, 1 reply; 4+ messages in thread
From: lists @ 2016-08-23 16:25 UTC (permalink / raw)
  To: linux-pm

Can't enable/switch to 'schedutil' governor

I'm running 

	uname -rm
		4.7.2-1.g34ba8d6-default x86_64

I'm trying to set/use the 'schedutil' governor.

On my kernel config line I add

	intel_pstate=disable

and re-exec

	grub2-mkconfig -o /boot/grub2/grub.cfg

and for startup I add

	cat /etc/systemd/system/cpupower.service
		[Unit]
		Description=CPU powersave

		[Service]
		Type=oneshot
		ExecStartPre=/sbin/modprobe cpufreq_schedutil
		ExecStart=/usr/bin/cpupower -c all frequency-set -g schedutil

		[Install]
		WantedBy=multi-user.target

After boot the cpufreq driver is loaded

	lsmod | grep cpu
		cpufreq_schedutil      16384  0
		acpi_cpufreq           24576  1

and the governor is available

	cpupower frequency-info --governors
		analyzing CPU 0:
		  available cpufreq governors: schedutil ondemand performance

but it's not loaded

	cpupower frequency-info
		analyzing CPU 0:
		  driver: acpi-cpufreq
		  CPUs which run at the same hardware frequency: 0
		  CPUs which need to have their frequency coordinated by software: 0
		  maximum transition latency: 4.0 us
		  hardware limits: 800 MHz - 2.80 GHz
		  available frequency steps:  2.80 GHz, 2.10 GHz, 1.60 GHz, 800 MHz
		  available cpufreq governors: schedutil ondemand performance
		  current policy: frequency should be within 800 MHz and 2.80 GHz.
		                  The governor "ondemand" may decide which speed to use
		                  within this range.
		  current CPU frequency: 800 MHz (asserted by call to hardware)
		  boost state support:
		    Supported: no
		    Active: no
		    Boost States: 0
		    Total States: 4
		    Pstate-P0:  2800MHz
		    Pstate-P1:  2100MHz
		    Pstate-P2:  1600MHz
		    Pstate-P3:  800MHz


and

	dmesg | grep cpu
		[    0.000000] setup_percpu: NR_CPUS:512 nr_cpumask_bits:512 nr_cpu_ids:6 nr_node_ids:1
		[    0.000000] percpu: Embedded 35 pages/cpu @ffff88022ec00000 s103960 r8192 d31208 u262144
		[    0.000000] pcpu-alloc: s103960 r8192 d31208 u262144 alloc=1*2097152
		[    0.000000] pcpu-alloc: [0] 0 1 2 3 4 5 - -
		[    0.000000]  RCU restricting CPUs from NR_CPUS=512 to nr_cpu_ids=6.
		[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=64, nr_cpu_ids=6
		[    0.576814] cpuidle: using governor ladder
		[    0.588811] cpuidle: using governor menu
		[    2.326385] ledtrig-cpu: registered to indicate activity on CPUs
		[    3.097374] systemd[1]: Mounting cgroup to /sys/fs/cgroup/cpuset of type cgroup with options cpuset.
		[    3.110386] systemd[1]: Mounting cgroup to /sys/fs/cgroup/cpu,cpuacct of type cgroup with options cpu,cpuacct.
		[   11.934611] systemd[1]: Installed new job cpupower.service/start as 193
		[   25.933005] acpi_cpufreq: overriding BIOS provided _PSD data

Trying to change it manually to 'schedutil' doesn't work either

	cpupower frequency-set -g schedutil
	cpupower frequency-info
		analyzing CPU 0:
		  driver: acpi-cpufreq
		  CPUs which run at the same hardware frequency: 0
		  CPUs which need to have their frequency coordinated by software: 0
		  maximum transition latency: 4.0 us
		  hardware limits: 800 MHz - 2.80 GHz
		  available frequency steps:  2.80 GHz, 2.10 GHz, 1.60 GHz, 800 MHz
		  available cpufreq governors: schedutil ondemand performance
		  current policy: frequency should be within 800 MHz and 2.80 GHz.
		                  The governor "ondemand" may decide which speed to use
		                  within this range.
		  current CPU frequency: 800 MHz (asserted by call to hardware)
		  boost state support:
		    Supported: no
		    Active: no
		    Boost States: 0
		    Total States: 4
		    Pstate-P0:  2800MHz
		    Pstate-P1:  2100MHz
		    Pstate-P2:  1600MHz
		    Pstate-P3:  800MHz

Am I missing some additional config or package that'd allow me to switch?

I can provide any useful current config; just let me know pls.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Can't enable/switch to 'schedutil' governor with kernel 4.7.2 ?
  2016-08-23 16:25 Can't enable/switch to 'schedutil' governor with kernel 4.7.2 ? lists
@ 2016-08-23 21:23 ` Doug Smythies
  2016-08-24 20:00   ` lists
  0 siblings, 1 reply; 4+ messages in thread
From: Doug Smythies @ 2016-08-23 21:23 UTC (permalink / raw)
  To: lists; +Cc: linux-pm

On 2016.08.23 09:25 lists@ssl-mail.com wrote:

> Can't enable/switch to 'schedutil' governor
> I'm running 
>	uname -rm
>		4.7.2-1.g34ba8d6-default x86_64
>
> I'm trying to set/use the 'schedutil' governor.

...[cut]...

Please try not using cpupower or any other utility.
Please try using the primitive commands directly.

For example:

To see what you are currently using:

cat /sys/devices/system/cpu/cpufreq/policy*/scaling_governor

To see what is available:

cat /sys/devices/system/cpu/cpufreq/policy*/scaling_available_governors

To set a new governor (as su):

for file in /sys/devices/system/cpu/cpufreq/policy*/scaling_governor; do echo "schedutil" > $file; done

Then check by using the first command again.

Example from my computer with a stock kernel 4.8-rc3:

$ cat /sys/devices/system/cpu/cpufreq/policy*/scaling_governor
ondemand
ondemand
ondemand
ondemand
ondemand
ondemand
ondemand
ondemand

$ cat /sys/devices/system/cpu/cpufreq/policy*/scaling_available_governors
ondemand performance
ondemand performance
ondemand performance
ondemand performance
ondemand performance
ondemand performance
ondemand performance
ondemand performance

In my case several of governors are modules and so do not
appear in the list, even though they actually are available.

$ sudo su
# for file in /sys/devices/system/cpu/cpufreq/policy*/scaling_governor; do echo "schedutil" > $file; done
# exit

$ cat /sys/devices/system/cpu/cpufreq/policy*/scaling_governor
schedutil
schedutil
schedutil
schedutil
schedutil
schedutil
schedutil
schedutil

Since the schedutil module has now been loaded, it now appears in the list:

$ cat /sys/devices/system/cpu/cpufreq/policy*/scaling_available_governors
schedutil ondemand performance
schedutil ondemand performance
schedutil ondemand performance
schedutil ondemand performance
schedutil ondemand performance
schedutil ondemand performance
schedutil ondemand performance
schedutil ondemand performance

... Doug



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Can't enable/switch to 'schedutil' governor with kernel 4.7.2 ?
  2016-08-23 21:23 ` Doug Smythies
@ 2016-08-24 20:00   ` lists
  2016-08-24 23:51     ` Doug Smythies
  0 siblings, 1 reply; 4+ messages in thread
From: lists @ 2016-08-24 20:00 UTC (permalink / raw)
  To: Doug Smythies; +Cc: linux-pm



On Tue, Aug 23, 2016, at 02:23 PM, Doug Smythies wrote:
> On 2016.08.23 09:25 lists@ssl-mail.com wrote:
> 
> > Can't enable/switch to 'schedutil' governor
> > I'm running 
> >	uname -rm
> >		4.7.2-1.g34ba8d6-default x86_64
> >
> > I'm trying to set/use the 'schedutil' governor.
> 
> ...[cut]...
> 
> Please try not using cpupower or any other utility.
> Please try using the primitive commands directly.

as a general rule? or in this case?

IT appears the problem's actually a kernel bug:

Bug 135391 - cpupower does not change the governor anymore 
https://bugzilla.kernel.org/show_bug.cgi?id=135391

AFAICT the fix isn't in the 4.7.X tree, just in the 4.8.X one.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Can't enable/switch to 'schedutil' governor with kernel 4.7.2 ?
  2016-08-24 20:00   ` lists
@ 2016-08-24 23:51     ` Doug Smythies
  0 siblings, 0 replies; 4+ messages in thread
From: Doug Smythies @ 2016-08-24 23:51 UTC (permalink / raw)
  To: lists; +Cc: linux-pm

On 2016.08.24  13:01 lists@ssl-mail.com wrote:
> On Tue, Aug 23, 2016, at 02:23 PM, Doug Smythies wrote:
>> On 2016.08.23 09:25 lists@ssl-mail.com wrote:
>> 
>>> Can't enable/switch to 'schedutil' governor
>>> I'm running 
>>>	uname -rm
>>>		4.7.2-1.g34ba8d6-default x86_64
>>>
>>> I'm trying to set/use the 'schedutil' governor.
>>
>> ...[cut]...
>> 
>> Please try not using cpupower or any other utility.
>> Please try using the primitive commands directly.

> as a general rule?

That is up to you. Myself, I never use other utilities
or tools if I can avoid it (and this issue is a good
example as to why).

> or in this case?

Yes, in this case as a way to separate the variables.
If you use a separate tool then you don't know if the
problem is in the tool or the kernel.

> IT appears the problem's actually a kernel bug:
>
> Bug 135391 - cpupower does not change the governor anymore 
> https://bugzilla.kernel.org/show_bug.cgi?id=135391

No, that looks to me like a bug in the tool/utility and not
the kernel itself.

> AFAICT the fix isn't in the 4.7.X tree, just in the 4.8.X one.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-08-25  4:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-23 16:25 Can't enable/switch to 'schedutil' governor with kernel 4.7.2 ? lists
2016-08-23 21:23 ` Doug Smythies
2016-08-24 20:00   ` lists
2016-08-24 23:51     ` Doug Smythies

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.