irqbalance/0006-irqbalance-cpu-powersave-code-disabled-when-power_th.patch

42 lines
1.5 KiB
Diff
Raw Normal View History

From ab5ee2928b75f12a2340afe6778a106886509b4c Mon Sep 17 00:00:00 2001
From: Petr Holasek <pholasek@redhat.com>
Date: Thu, 12 Jul 2012 14:54:16 +0200
Subject: [PATCH 6/8] irqbalance: cpu powersave code disabled when
power_thresh is not set
When user doesn't set power_thresh argument no cpu can enter powersave
mode. This patch should remove syslog clogging with pointless message
about re-enabling all cpus for irq balancing.
Signed-off-by: Petr Holasek <pholasek@redhat.com>
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
---
irqlist.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/irqlist.c b/irqlist.c
index c29ee84..e03aa7b 100644
--- a/irqlist.c
+++ b/irqlist.c
@@ -112,7 +112,7 @@ static void migrate_overloaded_irqs(struct topo_obj *obj, void *data)
if (obj->load <= info->avg_load) {
if ((obj->load + info->std_deviation) <= info->avg_load) {
info->num_under++;
- if (!info->powersave)
+ if (power_thresh != ULONG_MAX && !info->powersave)
if (!obj->powersave_mode)
info->powersave = obj;
} else
@@ -172,7 +172,7 @@ void update_migration_status(void)
{
struct load_balance_info info;
find_overloaded_objs(cpus, info);
- if (cycle_count > 5) {
+ if (power_thresh != ULONG_MAX && cycle_count > 5) {
if (!info.num_over && (info.num_under >= power_thresh) && info.powersave) {
syslog(LOG_INFO, "cpu %d entering powersave mode\n", info.powersave->number);
info.powersave->powersave_mode = 1;
--
1.7.11.4