Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753304AbbEGLcs (ORCPT ); Thu, 7 May 2015 07:32:48 -0400 Received: from terminus.zytor.com ([198.137.202.10]:57406 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752007AbbEGLcq (ORCPT ); Thu, 7 May 2015 07:32:46 -0400 Date: Thu, 7 May 2015 04:31:47 -0700 From: tip-bot for Chris Metcalf Message-ID: Cc: linux-kernel@vger.kernel.org, davej@redhat.com, bp@alien8.de, riel@redhat.com, umgwanakikbuti@gmail.com, hpa@zytor.com, mingo@kernel.org, fweisbec@gmail.com, cmetcalf@ezchip.com, oleg@redhat.com, rafael.j.wysocki@intel.com, tglx@linutronix.de, paulmck@linux.vnet.ibm.com, peterz@infradead.org, schwidefsky@de.ibm.com Reply-To: riel@redhat.com, umgwanakikbuti@gmail.com, hpa@zytor.com, mingo@kernel.org, linux-kernel@vger.kernel.org, davej@redhat.com, bp@alien8.de, tglx@linutronix.de, peterz@infradead.org, paulmck@linux.vnet.ibm.com, schwidefsky@de.ibm.com, fweisbec@gmail.com, cmetcalf@ezchip.com, oleg@redhat.com, rafael.j.wysocki@intel.com In-Reply-To: <1430928266-24888-4-git-send-email-fweisbec@gmail.com> References: <1429024675-18938-1-git-send-email-cmetcalf@ezchip.com> <1430928266-24888-4-git-send-email-fweisbec@gmail.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:timers/nohz] nohz: Add tick_nohz_full_add_cpus_to() API Git-Commit-ID: 83dedea8a07fb4bf91863764b15c1c4ec00330f9 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2618 Lines: 63 Commit-ID: 83dedea8a07fb4bf91863764b15c1c4ec00330f9 Gitweb: http://git.kernel.org/tip/83dedea8a07fb4bf91863764b15c1c4ec00330f9 Author: Chris Metcalf AuthorDate: Wed, 6 May 2015 18:04:25 +0200 Committer: Ingo Molnar CommitDate: Thu, 7 May 2015 12:02:51 +0200 nohz: Add tick_nohz_full_add_cpus_to() API This API is useful to modify a cpumask indicating some special nohz-type functionality so that the nohz cores are automatically added to that set. Signed-off-by: Chris Metcalf Signed-off-by: Frederic Weisbecker Acked-by: Peter Zijlstra (Intel) Cc: Borislav Petkov Cc: Dave Jones Cc: H. Peter Anvin Cc: Martin Schwidefsky Cc: Mike Galbraith Cc: Oleg Nesterov Cc: Paul E. McKenney Cc: Rafael J. Wysocki Cc: Rik van Riel Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1429024675-18938-1-git-send-email-cmetcalf@ezchip.com Link: http://lkml.kernel.org/r/1430928266-24888-4-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar --- include/linux/tick.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/linux/tick.h b/include/linux/tick.h index f8492da5..4191b56 100644 --- a/include/linux/tick.h +++ b/include/linux/tick.h @@ -134,6 +134,12 @@ static inline bool tick_nohz_full_cpu(int cpu) return cpumask_test_cpu(cpu, tick_nohz_full_mask); } +static inline void tick_nohz_full_add_cpus_to(struct cpumask *mask) +{ + if (tick_nohz_full_enabled()) + cpumask_or(mask, mask, tick_nohz_full_mask); +} + extern void __tick_nohz_full_check(void); extern void tick_nohz_full_kick(void); extern void tick_nohz_full_kick_cpu(int cpu); @@ -142,6 +148,7 @@ extern void __tick_nohz_task_switch(struct task_struct *tsk); #else static inline bool tick_nohz_full_enabled(void) { return false; } static inline bool tick_nohz_full_cpu(int cpu) { return false; } +static inline void tick_nohz_full_add_cpus_to(struct cpumask *mask) { } static inline void __tick_nohz_full_check(void) { } static inline void tick_nohz_full_kick_cpu(int cpu) { } static inline void tick_nohz_full_kick(void) { } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/