Skip to content

Commit

Permalink
tick/powerclamp: Remove tick_nohz_idle abuse
Browse files Browse the repository at this point in the history
commit 4dbd277 "tick: export nohz tick idle symbols for module
use" was merged via the thermal tree without an explicit ack from the
relevant maintainers.

The exports are abused by the intel powerclamp driver which implements
a fake idle state from a sched FIFO task. This causes all kinds of
wreckage in the NOHZ core code which rightfully assumes that
tick_nohz_idle_enter/exit() are only called from the idle task itself.

Recent changes in the NOHZ core lead to a failure of the powerclamp
driver and now people try to hack completely broken and backwards
workarounds into the NOHZ core code. This is completely unacceptable
and just papers over the real problem. There are way more subtle
issues lurking around the corner.

The real solution is to fix the powerclamp driver by rewriting it with
a sane concept, but that's beyond the scope of this.

So the only solution for now is to remove the calls into the core NOHZ
code from the powerclamp trainwreck along with the exports. 

Fixes: d6d71ee "PM: Introduce Intel PowerClamp Driver"
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Preeti U Murthy <preeti@linux.vnet.ibm.com>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Fengguang Wu <fengguang.wu@intel.com>
Cc: Frederic Weisbecker <frederic@kernel.org>
Cc: Pan Jacob jun <jacob.jun.pan@intel.com>
Cc: LKP <lkp@01.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/alpine.DEB.2.11.1412181110110.17382@nanos
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Thomas Gleixner committed Dec 19, 2014
1 parent 3a5dc1f commit a5fd973
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions drivers/thermal/intel_powerclamp.c
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,6 @@ static int clamp_thread(void *arg)
* allowed. thus jiffies are updated properly.
*/
preempt_disable();
tick_nohz_idle_enter();
/* mwait until target jiffies is reached */
while (time_before(jiffies, target_jiffies)) {
unsigned long ecx = 1;
Expand All @@ -451,7 +450,6 @@ static int clamp_thread(void *arg)
start_critical_timings();
atomic_inc(&idle_wakeup_counter);
}
tick_nohz_idle_exit();
preempt_enable();
}
del_timer_sync(&wakeup_timer);
Expand Down
2 changes: 0 additions & 2 deletions kernel/time/tick-sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,6 @@ void tick_nohz_idle_enter(void)

local_irq_enable();
}
EXPORT_SYMBOL_GPL(tick_nohz_idle_enter);

/**
* tick_nohz_irq_exit - update next tick event from interrupt exit
Expand Down Expand Up @@ -974,7 +973,6 @@ void tick_nohz_idle_exit(void)

local_irq_enable();
}
EXPORT_SYMBOL_GPL(tick_nohz_idle_exit);

static int tick_nohz_reprogram(struct tick_sched *ts, ktime_t now)
{
Expand Down

0 comments on commit a5fd973

Please sign in to comment.