Commit a22df92c authored by Len Brown's avatar Len Brown Committed by Len Brown

[ACPI] Add a module parameter to allow tuning how much bus-master activity

we remember when entering C3 -- /sys/module/processor/parameters/bm_history
Default varies with HZ -- 40ms for 25 - 800 HZ, 32ms for 1000 HZ.
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent caf866a0
...@@ -60,6 +60,15 @@ module_param(max_cstate, uint, 0644); ...@@ -60,6 +60,15 @@ module_param(max_cstate, uint, 0644);
static unsigned int nocst = 0; static unsigned int nocst = 0;
module_param(nocst, uint, 0000); module_param(nocst, uint, 0000);
/*
* bm_history -- bit-mask with a bit per jiffy of bus-master activity
* 1000 HZ: 0xFFFFFFFF: 32 jiffies = 32ms
* 800 HZ: 0xFFFFFFFF: 32 jiffies = 40ms
* 100 HZ: 0x0000000F: 4 jiffies = 40ms
* reduce history for more aggressive entry into C3
*/
static unsigned int bm_history = (HZ >= 800 ? 0xFFFFFFFF : ((1U << (HZ / 25)) - 1));
module_param(bm_history, uint, 0644);
/* -------------------------------------------------------------------------- /* --------------------------------------------------------------------------
Power Management Power Management
-------------------------------------------------------------------------- */ -------------------------------------------------------------------------- */
...@@ -438,7 +447,7 @@ acpi_processor_set_power_policy ( ...@@ -438,7 +447,7 @@ acpi_processor_set_power_policy (
cx->demotion.threshold.ticks = cx->latency_ticks; cx->demotion.threshold.ticks = cx->latency_ticks;
cx->demotion.threshold.count = 1; cx->demotion.threshold.count = 1;
if (cx->type == ACPI_STATE_C3) if (cx->type == ACPI_STATE_C3)
cx->demotion.threshold.bm = 0x0F; cx->demotion.threshold.bm = bm_history;
} }
lower = cx; lower = cx;
...@@ -458,7 +467,7 @@ acpi_processor_set_power_policy ( ...@@ -458,7 +467,7 @@ acpi_processor_set_power_policy (
else else
cx->promotion.threshold.count = 10; cx->promotion.threshold.count = 10;
if (higher->type == ACPI_STATE_C3) if (higher->type == ACPI_STATE_C3)
cx->promotion.threshold.bm = 0x0F; cx->promotion.threshold.bm = bm_history;
} }
higher = cx; higher = cx;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment