linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Metcalf <cmetcalf@mellanox.com>
To: Gilad Ben Yossef <giladb@mellanox.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Rik van Riel <riel@redhat.com>, Tejun Heo <tj@kernel.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Christoph Lameter <cl@linux.com>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will.deacon@arm.com>,
	Andy Lutomirski <luto@amacapital.net>,
	"H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Cc: Chris Metcalf <cmetcalf@mellanox.com>
Subject: [PATCH v14 11/14] clocksource: Do not schedule watchdog on isolated or NOHZ cpus
Date: Tue,  9 Aug 2016 16:29:53 -0400	[thread overview]
Message-ID: <1470774596-17341-12-git-send-email-cmetcalf@mellanox.com> (raw)
In-Reply-To: <1470774596-17341-1-git-send-email-cmetcalf@mellanox.com>

From: Christoph Lameter <cl@linux.com>

watchdog checks can only run on housekeeping capable cpus. Otherwise
we will be generating noise that we would like to avoid on the isolated
processors.

Signed-off-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Chris Metcalf <cmetcalf@mellanox.com>
  [line-wrapped and added equivalent fix in clocksource_start_watchdog()]
---
 kernel/time/clocksource.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index 6a5a310a1a53..b9c79c96d069 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -269,9 +269,12 @@ static void clocksource_watchdog(unsigned long data)
 	 * Cycle through CPUs to check if the CPUs stay synchronized
 	 * to each other.
 	 */
-	next_cpu = cpumask_next(raw_smp_processor_id(), cpu_online_mask);
+	next_cpu = cpumask_next_and(raw_smp_processor_id(), cpu_online_mask,
+				    housekeeping_cpumask());
 	if (next_cpu >= nr_cpu_ids)
-		next_cpu = cpumask_first(cpu_online_mask);
+		next_cpu = cpumask_first_and(cpu_online_mask,
+					     housekeeping_cpumask());
+
 	watchdog_timer.expires += WATCHDOG_INTERVAL;
 	add_timer_on(&watchdog_timer, next_cpu);
 out:
@@ -285,7 +288,8 @@ static inline void clocksource_start_watchdog(void)
 	init_timer(&watchdog_timer);
 	watchdog_timer.function = clocksource_watchdog;
 	watchdog_timer.expires = jiffies + WATCHDOG_INTERVAL;
-	add_timer_on(&watchdog_timer, cpumask_first(cpu_online_mask));
+	add_timer_on(&watchdog_timer,
+		     cpumask_first_and(cpu_online_mask, housekeeping_cpumask()));
 	watchdog_running = 1;
 }
 
-- 
2.7.2

  parent reply	other threads:[~2016-08-09 20:31 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-09 20:29 [PATCH v14 00/14] support "task_isolation" mode Chris Metcalf
2016-08-09 20:29 ` [PATCH v14 01/14] vmstat: add quiet_vmstat_sync function Chris Metcalf
2016-08-09 20:29 ` [PATCH v14 02/14] vmstat: add vmstat_idle function Chris Metcalf
2016-08-09 20:29 ` [PATCH v14 03/14] lru_add_drain_all: factor out lru_add_drain_needed Chris Metcalf
2016-08-09 20:29 ` [PATCH v14 04/14] task_isolation: add initial support Chris Metcalf
2016-08-11 18:11   ` Frederic Weisbecker
2016-08-11 18:50     ` Christoph Lameter
2016-08-15 14:59       ` Chris Metcalf
2016-08-30  0:55         ` Frederic Weisbecker
2016-08-30 15:41           ` Chris Metcalf
2016-08-30 17:10             ` Frederic Weisbecker
2016-08-30 17:36               ` Chris Metcalf
2016-08-30 18:17                 ` Chris Metcalf
2016-09-03 15:31                   ` Frederic Weisbecker
2016-09-09 18:54                     ` Chris Metcalf
2016-08-09 20:29 ` [PATCH v14 05/14] task_isolation: track asynchronous interrupts Chris Metcalf
2016-08-09 20:29 ` [PATCH v14 06/14] arch/x86: enable task isolation functionality Chris Metcalf
2016-08-10  7:52   ` Andy Lutomirski
2016-08-10 14:30     ` Chris Metcalf
2016-08-10 19:17       ` Andy Lutomirski
2016-08-10 19:40         ` Chris Metcalf
2016-08-10 20:06           ` Andy Lutomirski
2016-08-09 20:29 ` [PATCH v14 07/14] arm64: factor work_pending state machine to C Chris Metcalf
2016-08-09 20:29 ` [PATCH v14 08/14] arch/arm64: enable task isolation functionality Chris Metcalf
2016-08-09 20:29 ` [PATCH v14 09/14] arch/tile: " Chris Metcalf
2016-08-09 20:29 ` [PATCH v14 10/14] arm, tile: turn off timer tick for oneshot_stopped state Chris Metcalf
2016-08-09 20:29 ` Chris Metcalf [this message]
2016-08-09 20:29 ` [PATCH v14 12/14] task_isolation: support CONFIG_TASK_ISOLATION_ALL Chris Metcalf
2016-08-09 20:29 ` [PATCH v14 13/14] task_isolation: add user-settable notification signal Chris Metcalf
2016-08-09 20:29 ` [PATCH v14 14/14] task_isolation self test Chris Metcalf

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=1470774596-17341-12-git-send-email-cmetcalf@mellanox.com \
    --to=cmetcalf@mellanox.com \
    --cc=akpm@linux-foundation.org \
    --cc=catalin.marinas@arm.com \
    --cc=cl@linux.com \
    --cc=fweisbec@gmail.com \
    --cc=giladb@mellanox.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=mingo@kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=riel@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=tj@kernel.org \
    --cc=viresh.kumar@linaro.org \
    --cc=will.deacon@arm.com \
    --cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).