Skip to contentSkip to conversation

3.9.0 + CONFIG_X86_INTEL_PSTATE=y -> ThinkPad T420 with i5 lost ACPI functionality

DISCUSSION Toralf Förster 3 participants 14 messages May 3, 2013 – Jul 7, 2013 ACPI

lore
Share & tools
lore
#0 lore raw

The following file doesn't exists at my Gentoo Linux /sys/devices/system/cpu/cpufreq/ondemand/ignore_nice_load in 3.9.0 if I activate CONFIG_X86_INTEL_PSTATE=y

That means, that a command like

$> echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/ignore_nice_load

in /etc/rc.local is now no longer working.
A high fan + high temperature are the result, even if just the BOINC client is run with low prio (nice 19) in the back ground.

Manually loading the missing module won't work too :

$> modprobe acpi_cpufreq
modprobe: ERROR: could not insert 'acpi_cpufreq': Device or resource busy

Is the behaviour a bug or a feature ?
In the later case: How can I achieve the previous behaviour back ?

This issue might affect the RH EL kernel too [1] where I observed a similar behaviour.

[1] http://elrepo.org/bugs/view.php?id=379

Signature · 3 lines
MfG/Sincerely
Toralf Förster
pgp finger print: 7B1A 07F4 EC82 0F90 D4C2 8936 872A E508 7DB6 9DA3
#1 lore raw
Quoted 12 lines · Toralf Förster

The following file doesn't exists at my Gentoo Linux /sys/devices/system/cpu/cpufreq/ondemand/ignore_nice_load in 3.9.0 if I activate CONFIG_X86_INTEL_PSTATE=y

That means, that a command like

$> echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/ignore_nice_load

in /etc/rc.local is now no longer working.
A high fan + high temperature are the result, even if just the BOINC client is run with low prio (nice 19) in the back ground.

Quoted 6 lines

Manually loading the missing module won't work too :

$> modprobe acpi_cpufreq
modprobe: ERROR: could not insert 'acpi_cpufreq': Device or resource busy

Is the behaviour a bug or a feature ?

The thermal management problem is not an intentional outcome, definitely.

Quoted 6 lines

In the later case: How can I achieve the previous behaviour back ?

This issue might affect the RH EL kernel too [1] where I observed a similar behaviour.

[1] http://elrepo.org/bugs/view.php?id=379

Dirk, is this the problem we were talking about recently or something else?

Rafael

Signature · 6 lines
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw
Quoted 5 lines · Rafael J. Wysocki
Quoted 4 lines · Toralf Förster

The following file doesn't exists at my Gentoo Linux /sys/devices/system/cpu/cpufreq/ondemand/ignore_nice_load in 3.9.0 if I activate CONFIG_X86_INTEL_PSTATE=y

Quoted 8 lines
Quoted 8 lines

That means, that a command like

$> echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/ignore_nice_load

in /etc/rc.local is now no longer working.
A high fan + high temperature are the result, even if just the BOINC client is run with low prio (nice 19) in the back ground.

ignore_nice_load is a feature of the ondemand governor.

The intel_pstate driver is seeing the load presented by the BOINC client and is adjusting the pstate accordingly.

Quoted 6 lines
Quoted 6 lines

Manually loading the missing module won't work too :

$> modprobe acpi_cpufreq
modprobe: ERROR: could not insert 'acpi_cpufreq': Device or resource busy

Is the behaviour a bug or a feature ?

The intel_pstate drive has already registered as a scaling driver so when acpi_cpufreq tries to register as a scaling driver the registration fails

Quoted 5 lines

The thermal management problem is not an intentional outcome, definitely.

Quoted 2 lines

In the later case: How can I achieve the previous behaviour back ?

If you require the ondemand governor you can remove CONFIG_X86_INTEL_PSTATE from your configuration or add "intel_pstate=disable" to your kernel command line.

--Dirk

Quoted 10 lines
Quoted 4 lines

This issue might affect the RH EL kernel too [1] where I observed a similar behaviour.

[1] http://elrepo.org/bugs/view.php?id=379

Dirk, is this the problem we were talking about recently or something else?

Rafael

#3 lore raw
Quoted 4 lines · Dirk Brandewie

ignore_nice_load is a feature of the ondemand governor.
The intel_pstate driver is seeing the load presented by the BOINC client and is adjusting the pstate accordingly.

Is the intel_pstate driver a choice for a notebook and friends where a grid software is running as a low-prio back ground job ?

Because the CPU will be running mostly at high(er) frequency - which always results in a high temperature and short battery time.

Signature · 3 lines
MfG/Sincerely
Toralf Förster
pgp finger print: 7B1A 07F4 EC82 0F90 D4C2 8936 872A E508 7DB6 9DA3
#4 lore raw
Quoted 9 lines · Toralf Förster
Quoted 4 lines · Dirk Brandewie

ignore_nice_load is a feature of the ondemand governor.
The intel_pstate driver is seeing the load presented by the BOINC client and is adjusting the pstate accordingly.

Is the intel_pstate driver a choice for a notebook and friends where a grid software is running as a low-prio back ground job ?

Probably not.

Quoted 3 lines

Because the CPU will be running mostly at high(er) frequency - which always results in a high temperature and short battery time.

It would be better IMHO if the client software limited the resources it uses when the system is not on wall power but that is a seperate discussion :-)

--Dirk

#5 lore raw
Quoted 7 lines · Dirk Brandewie
Quoted 6 lines · Toralf Förster
Quoted 4 lines · Dirk Brandewie

ignore_nice_load is a feature of the ondemand governor.
The intel_pstate driver is seeing the load presented by the BOINC client and is adjusting the pstate accordingly.

Quoted 5 lines
Quoted 3 lines

Is the intel_pstate driver a choice for a notebook and friends where a grid software is running as a low-prio back ground job ?

Probably not.

Hhm.

The kernel menuconfig says :

This driver provides a P state for Intel core processors The driver implements an internal governor and will become the scaling driver and governor for Sandy bridge processors.

What shall a company like IBM with a lot of notebook installation running BOINC in the back ground process (World Community Grid) do - what's the consequence for those installations if they will have that a processor ?

In the past (few years ago and related to the ondemand governor IIRC) there were already a longer discussion about the "nice -n 19" topic and the result was to support it.

/me Cc:'ing boinc devs, the topic might be interesting for them too.

Quoted 11 lines
Quoted 3 lines

Because the CPU will be running mostly at high(er) frequency - which always results in a high temperature and short battery time.

It would be better IMHO if the client software limited the resources it uses when the system is not on wall power but that is a seperate discussion :-)

--Dirk

Signature · 9 lines
MfG/Sincerely
Toralf Förster
pgp finger print: 7B1A 07F4 EC82 0F90 D4C2 8936 872A E508 7DB6 9DA3
_______________________________________________
boinc_dev mailing list
[email protected]
http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev
To unsubscribe, visit the above URL and
(near bottom of page) enter your email address.
#6 lore raw
Quoted 27 lines · Toralf Förster
Quoted 7 lines · Dirk Brandewie
Quoted 6 lines · Toralf Förster
Quoted 4 lines · Dirk Brandewie

ignore_nice_load is a feature of the ondemand governor.
The intel_pstate driver is seeing the load presented by the BOINC client and is adjusting the pstate accordingly.

Quoted 5 lines
Quoted 3 lines

Is the intel_pstate driver a choice for a notebook and friends where a grid software is running as a low-prio back ground job ?

Probably not.

Hhm.

The kernel menuconfig says :

This driver provides a P state for Intel core processors The driver implements an internal governor and will become the scaling driver and governor for Sandy bridge processors.

What shall a company like IBM with a lot of notebook installation running BOINC in the back ground process (World Community Grid) do - what's the consequence for those installations if they will have that a processor ?

Quoted 5 lines

In the past (few years ago and related to the ondemand governor IIRC) there were already a longer discussion about the "nice -n 19" topic and the result was to support it.

/me Cc:'ing boinc devs, the topic might be interesting for them too.

One option might be to use the powerclamp driver along with intel_pstate to reduce the heat dissipation.

Thanks,
Rafael

Signature · 6 lines
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#7 lore raw
In reply to Rafael J. Wysocki
Quoted 13 lines · Rafael J. Wysocki
Quoted 12 lines · Toralf Förster

The following file doesn't exists at my Gentoo Linux /sys/devices/system/cpu/cpufreq/ondemand/ignore_nice_load in 3.9.0 if I activate CONFIG_X86_INTEL_PSTATE=y

That means, that a command like

$> echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/ignore_nice_load

in /etc/rc.local is now no longer working.
A high fan + high temperature are the result, even if just the BOINC client is run with low prio (nice 19) in the back ground.

Quoted 11 lines
Quoted 6 lines

Manually loading the missing module won't work too :

$> modprobe acpi_cpufreq
modprobe: ERROR: could not insert 'acpi_cpufreq': Device or resource busy

Is the behaviour a bug or a feature ?

The thermal management problem is not an intentional outcome, definitely.

Quoted 2 lines

In the later case: How can I achieve the previous behaviour back ?

I spent some more time looking for a solution to this you can get same behavior by setting a config option in BOINC "Use at most X % CPU time"
see: http://boinc.berkeley.edu/wiki/Local_preferences

Quoted 10 lines
Quoted 4 lines

This issue might affect the RH EL kernel too [1] where I observed a similar behaviour.

[1] http://elrepo.org/bugs/view.php?id=379

Dirk, is this the problem we were talking about recently or something else?

Rafael

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#8 lore raw
Quoted 3 lines · Dirk Brandewie

I spent some more time looking for a solution to this you can get same behavior
by setting a config option in BOINC "Use at most X % CPU time"

yes - that's true. But BOINC is just an example.

If "nice -19 <loooong running background job" is nowadays so uncommon, then I'm just curious what's the modern (easy) way of doing that ?

Signature · 3 lines
MfG/Sincerely
Toralf Förster
pgp finger print: 7B1A 07F4 EC82 0F90 D4C2 8936 872A E508 7DB6 9DA3
#9 lore raw
Quoted 10 lines · Toralf Förster
Quoted 3 lines · Dirk Brandewie

I spent some more time looking for a solution to this you can get same behavior
by setting a config option in BOINC "Use at most X % CPU time"

yes - that's true. But BOINC is just an example.

If "nice -19 <loooong running background job" is nowadays so uncommon, then I'm just curious what's the modern (easy) way of doing that ?

I believe using CGROUP's is the right answer for limiting this type of load.

I have not tested it but from reading:
Documentation/scheduler/sched-design-CFS.txt
https://wiki.archlinux.org/index.php/Cgroups

You should be able to do something like the following:

cd /sys/fs/cgroup/cpu
mkdir bonic
echo 400 > boinc/cpu.shares
boinc &
echo $! > boinc/tasks

Should limit the boinc group to ~40% of the cpu.

WARNING completely untested YMMV

--Dirk

#10 lore raw
Quoted 5 lines · Dirk Brandewie

cd /sys/fs/cgroup/cpu
mkdir bonic
echo 400 > boinc/cpu.shares
boinc &
echo $! > boinc/tasks

In many places of my scripts for automated testing I use currently the "nice -n" prefix at my ThinkPad to keep a long battery life, quiet fan, cool CPU. The CPU just runs with minimal frequency but will give med/max. power on demand.

If the P-State governor will be the replacement the old behaviour -

the kernel menu config says "will become the perferred ... (sic!) ...scaling driver for Sandy bridge processors" -

is there a nifty user space tool which replaces "nice" and do all cgroup stuff for the user ?

Signature · 3 lines
MfG/Sincerely
Toralf Förster
pgp finger print: 7B1A 07F4 EC82 0F90 D4C2 8936 872A E508 7DB6 9DA3
#11 lore raw
Quoted 12 lines · Toralf Förster
Quoted 5 lines · Dirk Brandewie

cd /sys/fs/cgroup/cpu
mkdir bonic
echo 400 > boinc/cpu.shares
boinc &
echo $! > boinc/tasks

In many places of my scripts for automated testing I use currently the "nice -n" prefix at my ThinkPad to keep a long battery life, quiet fan, cool CPU. The CPU just runs with minimal frequency but will give med/max. power on demand.

Quoted 8 lines

If the P-State governor will be the replacement the old behaviour -

the kernel menu config says "will become the perferred ... (sic!) ...scaling driver for Sandy bridge processors" -

is there a nifty user space tool which replaces "nice" and do all cgroup stuff for the user ?

cgexec from the libcgroup-tools package (fedora name) look like it will place a process in a group for you.

https://wiki.archlinux.org/index.php/Cgroups

Has some useful examples.

--Dirk
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#12 lore raw
Quoted 26 lines · Dirk Brandewie
Quoted 12 lines · Toralf Förster
Quoted 5 lines · Dirk Brandewie

cd /sys/fs/cgroup/cpu
mkdir bonic
echo 400 > boinc/cpu.shares
boinc &
echo $! > boinc/tasks

In many places of my scripts for automated testing I use currently the "nice -n" prefix at my ThinkPad to keep a long battery life, quiet fan, cool CPU. The CPU just runs with minimal frequency but will give med/max. power on demand.

Quoted 8 lines

If the P-State governor will be the replacement the old behaviour -

the kernel menu config says "will become the perferred ... (sic!) ...scaling driver for Sandy bridge processors" -

is there a nifty user space tool which replaces "nice" and do all cgroup stuff for the user ?

cgexec from the libcgroup-tools package (fedora name) look like it will place
a process in a group for you.

Quoted 6 lines

https://wiki.archlinux.org/index.php/Cgroups

Has some useful examples.

--Dirk

I'm not really convinced about using P-State in favour of ondemand - with the cpu ondemand governor my freshly booted system with just KDE started stays here around 39°C - with pstate I do have 53°C.

Even more if I run BOINC the temperature is around 92° even with these settings :

tail -v /sys/fs/cgroup/cpu/groupname/boinc/*
==> /sys/fs/cgroup/cpu/groupname/boinc/cgroup.clone_children <== 0

==> /sys/fs/cgroup/cpu/groupname/boinc/cgroup.event_control <==
tail: error reading ‘/sys/fs/cgroup/cpu/groupname/boinc/cgroup.event_control’: Invalid argument

==> /sys/fs/cgroup/cpu/groupname/boinc/cgroup.procs <== 3411
3415
3416
3417
3419
3421
3422
3423
3434
3435

==> /sys/fs/cgroup/cpu/groupname/boinc/cpu.cfs_period_us <== 100000

==> /sys/fs/cgroup/cpu/groupname/boinc/cpu.cfs_quota_us <== -1

==> /sys/fs/cgroup/cpu/groupname/boinc/cpu.shares <== 2

==> /sys/fs/cgroup/cpu/groupname/boinc/cpu.stat <== nr_periods 0
nr_throttled 0
throttled_time 0

==> /sys/fs/cgroup/cpu/groupname/boinc/notify_on_release <== 0

==> /sys/fs/cgroup/cpu/groupname/boinc/tasks <==
3417
3418
3419
3420
3421
3422
3423
3424
3434
3435

Signature · 3 lines
MfG/Sincerely
Toralf Förster
pgp finger print: 7B1A 07F4 EC82 0F90 D4C2 8936 872A E508 7DB6 9DA3
#13 lore raw
Quoted 10 lines · Toralf Förster

cgexec from the libcgroup-tools package (fedora name) look like it will

Quoted 9 lines

place
a process in a group for you.

https://wiki.archlinux.org/index.php/Cgroups

Has some useful examples.

--Dirk

What I'm looking for is a command telling the governor "do not increase CPU frequency for this process (group)" - because that's the main intention of "nice -19", right ?

Without such a simple-to-use-command/replacement-of-nice-19 a lot of systems in the wild won't work as expected with the p-state driver in place of acpi_cpufreq.

(And AFAICR this was one of those reasons why for ondemand the "ignore_nice" sysfs feature was implemented)

Especially RedHat systems using the kernel-ml will automatically switch to p-state - pretty sure, that's not wanted by a reasonable amount of people, or ?

Signature · 3 lines
MfG/Sincerely
Toralf Förster
pgp finger print: 7B1A 07F4 EC82 0F90 D4C2 8936 872A E508 7DB6 9DA3