Bug 9704 - ACPI: processor throttling set error
Summary: ACPI: processor throttling set error
Status: CLOSED CODE_FIX
Alias: None
Product: ACPI
Classification: Unclassified
Component: Config-Processors (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: acpi_config-processors
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-06 23:36 UTC by Yi Yang
Modified: 2008-07-16 15:40 UTC (History)
3 users (show)

See Also:
Kernel Version: 2,6.24-rc6
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
This patch fixed this bug. (11.20 KB, patch)
2008-01-06 23:39 UTC, Yi Yang
Details | Diff

Description Yi Yang 2008-01-06 23:36:52 UTC
Most recent kernel where this bug did not occur: None
Distribution: FC8
Hardware Environment: All
Software Environment: All
Problem Description: 
When echo some invalid values to /proc/acpi/processor/*/throttling,
there isn't any error info returned, on the contray, it sets
throttling value to some T* successfully, obviously, this is incorrect,
a correct way should be to let it fail and return error info.

Steps to reproduce:

[root@localhost /]# echo "2xxxx" > /proc/acpi/processor/CPU0/throttling
[root@localhost /]# cat /proc/acpi/processor/CPU0/throttling
state count:             8
active state:            T2
state available: T0 to T7
states:
    T0:                  100%
    T1:                  87%
   *T2:                  75%
    T3:                  62%
    T4:                  50%
    T5:                  37%
    T6:                  25%
    T7:                  12%
[root@localhost /]# echo "" > /proc/acpi/processor/CPU0/throttling
[root@localhost /]# cat /proc/acpi/processor/CPU0/throttling
state count:             8
active state:            T0
state available: T0 to T7
states:
   *T0:                  100%
    T1:                  87%
    T2:                  75%
    T3:                  62%
    T4:                  50%
    T5:                  37%
    T6:                  25%
    T7:                  12%
[root@localhost /]# echo "7xxx" > /proc/acpi/processor/CPU0/throttling
[root@localhost /]# cat /proc/acpi/processor/CPU0/throttling
state count:             8
active state:            T7
state available: T0 to T7
states:
    T0:                  100%
    T1:                  87%
    T2:                  75%
    T3:                  62%
    T4:                  50%
    T5:                  37%
    T6:                  25%
   *T7:                  12%
[root@localhost /]#
Comment 1 Yi Yang 2008-01-06 23:39:12 UTC
Created attachment 14319 [details]
This patch fixed this bug.

This patch fixed the aforementioned issue, it also enables
/proc/acpi/processor/*/throttling to accept such values as 't0' and 'T0',
it also strictly limits /proc/acpi/processor/*/throttling only to accept
 "*", "t*" and "T*", "*" is the throttling state value the processor can
support, current, it is 0 - 7.
Comment 2 Len Brown 2008-06-13 21:54:57 UTC
patch in comment #1 applied to acpi-test
Comment 3 Adrian Bunk 2008-07-16 15:40:32 UTC
in Linus' tree as commit 3d532d5e3882c1387a2722df2a368c4a9224b12f

Note You need to log in before you can comment on or make changes to this bug.