From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031058Ab2CUOEJ (ORCPT ); Wed, 21 Mar 2012 10:04:09 -0400 Received: from mail-wg0-f44.google.com ([74.125.82.44]:47416 "EHLO mail-wg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031008Ab2CUN7p (ORCPT ); Wed, 21 Mar 2012 09:59:45 -0400 From: Frederic Weisbecker To: LKML , linaro-sched-sig@lists.linaro.org Cc: Frederic Weisbecker , Alessio Igor Bogani , Andrew Morton , Avi Kivity , Chris Metcalf , Christoph Lameter , Daniel Lezcano , Geoff Levand , Gilad Ben Yossef , Ingo Molnar , Max Krasnyansky , "Paul E. McKenney" , Peter Zijlstra , Stephen Hemminger , Steven Rostedt , Sven-Thorsten Dietrich , Thomas Gleixner , Zen Lin Subject: [PATCH 16/32] rcu: Restart the tick on non-responding adaptive nohz CPUs Date: Wed, 21 Mar 2012 14:58:22 +0100 Message-Id: <1332338318-5958-18-git-send-email-fweisbec@gmail.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1332338318-5958-1-git-send-email-fweisbec@gmail.com> References: <1332338318-5958-1-git-send-email-fweisbec@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When a CPU in adaptive nohz mode doesn't respond to complete a grace period, issue it a specific IPI so that it restarts the tick and chases a quiescent state. Signed-off-by: Frederic Weisbecker Cc: Alessio Igor Bogani Cc: Andrew Morton Cc: Avi Kivity Cc: Chris Metcalf Cc: Christoph Lameter Cc: Daniel Lezcano Cc: Geoff Levand Cc: Gilad Ben Yossef Cc: Ingo Molnar Cc: Max Krasnyansky Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Stephen Hemminger Cc: Steven Rostedt Cc: Sven-Thorsten Dietrich Cc: Thomas Gleixner Cc: Zen Lin --- kernel/rcutree.c | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/kernel/rcutree.c b/kernel/rcutree.c index e141c7e..3fffc26 100644 --- a/kernel/rcutree.c +++ b/kernel/rcutree.c @@ -50,6 +50,7 @@ #include #include #include +#include #include "rcutree.h" #include @@ -302,6 +303,20 @@ static struct rcu_node *rcu_get_root(struct rcu_state *rsp) #ifdef CONFIG_SMP +static void cpuset_update_rcu_cpu(int cpu) +{ +#ifdef CONFIG_CPUSETS_NO_HZ + unsigned long flags; + + local_irq_save(flags); + + if (cpuset_cpu_adaptive_nohz(cpu)) + smp_cpuset_update_nohz(cpu); + + local_irq_restore(flags); +#endif +} + /* * If the specified CPU is offline, tell the caller that it is in * a quiescent state. Otherwise, whack it with a reschedule IPI. @@ -325,6 +340,8 @@ static int rcu_implicit_offline_qs(struct rcu_data *rdp) return 1; } + cpuset_update_rcu_cpu(rdp->cpu); + /* * The CPU is online, so send it a reschedule IPI. This forces * it through the scheduler, and (inefficiently) also handles cases -- 1.7.5.4