All of lore.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Thomas Gleixner <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: frederic@kernel.org, preeti@linux.vnet.ibm.com,
	rui.zhang@intel.com, tglx@linutronix.de, fweisbec@gmail.com,
	fengguang.wu@intel.com, peterz@infradead.org,
	linux-kernel@vger.kernel.org, lkp@01.org, hpa@zytor.com,
	mingo@kernel.org, jacob.jun.pan@intel.com,
	viresh.kumar@linaro.org
Subject: [tip:timers/urgent] tick/powerclamp: Remove tick_nohz_idle abuse
Date: Fri, 19 Dec 2014 05:09:37 -0800	[thread overview]
Message-ID: <tip-a5fd9733a30d18d7ac23f17080e7e07bb3205b69@git.kernel.org> (raw)
In-Reply-To: <alpine.DEB.2.11.1412181110110.17382@nanos>

Commit-ID:  a5fd9733a30d18d7ac23f17080e7e07bb3205b69
Gitweb:     http://git.kernel.org/tip/a5fd9733a30d18d7ac23f17080e7e07bb3205b69
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Thu, 18 Dec 2014 11:51:01 +0100
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 19 Dec 2014 14:05:52 +0100

tick/powerclamp: Remove tick_nohz_idle abuse

commit 4dbd27711cd9 "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: d6d71ee4a14a "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>
---
 drivers/thermal/intel_powerclamp.c | 2 --
 kernel/time/tick-sched.c           | 2 --
 2 files changed, 4 deletions(-)

diff --git a/drivers/thermal/intel_powerclamp.c b/drivers/thermal/intel_powerclamp.c
index 95cb7fc..6cb7849 100644
--- a/drivers/thermal/intel_powerclamp.c
+++ b/drivers/thermal/intel_powerclamp.c
@@ -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;
@@ -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);
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index 1f43560..ff3ec34 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -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
@@ -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)
 {

WARNING: multiple messages have this Message-ID (diff)
From: tip-bot for Thomas Gleixner <tipbot@zytor.com>
To: lkp@lists.01.org
Subject: [tip:timers/urgent] tick/powerclamp: Remove tick_nohz_idle abuse
Date: Fri, 19 Dec 2014 05:09:37 -0800	[thread overview]
Message-ID: <tip-a5fd9733a30d18d7ac23f17080e7e07bb3205b69@git.kernel.org> (raw)
In-Reply-To: <alpine.DEB.2.11.1412181110110.17382@nanos>

[-- Attachment #1: Type: text/plain, Size: 3445 bytes --]

Commit-ID:  a5fd9733a30d18d7ac23f17080e7e07bb3205b69
Gitweb:     http://git.kernel.org/tip/a5fd9733a30d18d7ac23f17080e7e07bb3205b69
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Thu, 18 Dec 2014 11:51:01 +0100
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 19 Dec 2014 14:05:52 +0100

tick/powerclamp: Remove tick_nohz_idle abuse

commit 4dbd27711cd9 "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: d6d71ee4a14a "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(a)vger.kernel.org
Link: http://lkml.kernel.org/r/alpine.DEB.2.11.1412181110110.17382(a)nanos
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 drivers/thermal/intel_powerclamp.c | 2 --
 kernel/time/tick-sched.c           | 2 --
 2 files changed, 4 deletions(-)

diff --git a/drivers/thermal/intel_powerclamp.c b/drivers/thermal/intel_powerclamp.c
index 95cb7fc..6cb7849 100644
--- a/drivers/thermal/intel_powerclamp.c
+++ b/drivers/thermal/intel_powerclamp.c
@@ -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;
@@ -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);
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index 1f43560..ff3ec34 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -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
@@ -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)
 {

  parent reply	other threads:[~2014-12-19 13:10 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-18 10:51 [PATCH] tick/powerclamp: Remove tick_nohz_idle abuse Thomas Gleixner
2014-12-18 10:51 ` Thomas Gleixner
2014-12-18 14:01 ` Eduardo Valentin
2014-12-18 14:01   ` Eduardo Valentin
2014-12-18 14:43   ` Thomas Gleixner
2014-12-18 14:43     ` Thomas Gleixner
2014-12-18 17:28 ` Preeti U Murthy
2014-12-18 17:28   ` Preeti U Murthy
     [not found]   ` <DD415AA12F8FF042BF4EA69DF123C1478AF91730@ORSMSX101.amr.corp.intel.com>
2014-12-18 19:52     ` Jacob Pan
2014-12-18 19:52       ` Jacob Pan
2014-12-18 21:12       ` Thomas Gleixner
2014-12-18 21:12         ` Thomas Gleixner
2014-12-19 18:39         ` Jacob Pan
2014-12-19 18:39           ` Jacob Pan
2014-12-19 19:56           ` Thomas Gleixner
2014-12-19 19:56             ` Thomas Gleixner
2014-12-20  1:31             ` Preeti U Murthy
2014-12-20  1:31               ` Preeti U Murthy
2014-12-23  2:57               ` Jacob Pan
2014-12-23  2:57                 ` Jacob Pan
2014-12-31  5:04                 ` Preeti U Murthy
2014-12-31  5:04                   ` Preeti U Murthy
2014-12-19 13:09 ` tip-bot for Thomas Gleixner [this message]
2014-12-19 13:09   ` [tip:timers/urgent] " tip-bot for Thomas Gleixner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-a5fd9733a30d18d7ac23f17080e7e07bb3205b69@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=fengguang.wu@intel.com \
    --cc=frederic@kernel.org \
    --cc=fweisbec@gmail.com \
    --cc=hpa@zytor.com \
    --cc=jacob.jun.pan@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=lkp@01.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=preeti@linux.vnet.ibm.com \
    --cc=rui.zhang@intel.com \
    --cc=tglx@linutronix.de \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.