Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752687AbbDCQYk (ORCPT ); Fri, 3 Apr 2015 12:24:40 -0400 Received: from mail-am1on0058.outbound.protection.outlook.com ([157.56.112.58]:43053 "EHLO emea01-am1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752244AbbDCQY1 (ORCPT ); Fri, 3 Apr 2015 12:24:27 -0400 Authentication-Results: spf=fail (sender IP is 12.216.194.146) smtp.mailfrom=ezchip.com; ezchip.com; dkim=none (message not signed) header.d=none; From: To: "Peter Zijlstra (Intel)" , Frederic Weisbecker , "Paul E. McKenney" , "Rafael J. Wysocki" , Martin Schwidefsky , Ingo Molnar , CC: Chris Metcalf Subject: [PATCH 1/2] nohz: add tick_nohz_full_set_cpus() API Date: Fri, 3 Apr 2015 12:24:07 -0400 Message-ID: <1428078248-5425-1-git-send-email-cmetcalf@ezchip.com> X-Mailer: git-send-email 2.1.2 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:12.216.194.146;CTRY:US;IPV:NLI;EFV:NLI;BMV:1;SFV:NSPM;SFS:(10009020)(6009001)(339900001)(199003)(189002)(50986999)(62966003)(229853001)(42186005)(77156002)(92566002)(36756003)(46102003)(50466002)(104016003)(48376002)(105606002)(106466001)(86362001)(86152002)(19580395003)(6806004)(19580405001)(50226001)(87936001)(85426001)(33646002)(47776003);DIR:OUT;SFP:1101;SCL:1;SRVR:AM2PR02MB0769;H:ld-1.internal.tilera.com;FPR:;SPF:Fail;MLV:sfv;A:1;MX:1;LANG:en; MIME-Version: 1.0 Content-Type: text/plain X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:AM2PR02MB0769;UriScan:;BCL:0;PCL:0;RULEID:;SRVR:AM2PR02MB0417; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(5002010);SRVR:AM2PR02MB0769;BCL:0;PCL:0;RULEID:;SRVR:AM2PR02MB0769; X-Forefront-PRVS: 05352A48BE X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Apr 2015 16:24:22.5897 (UTC) X-MS-Exchange-CrossTenant-Id: 0fc16e0a-3cd3-4092-8b2f-0a42cff122c3 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=0fc16e0a-3cd3-4092-8b2f-0a42cff122c3;Ip=[12.216.194.146];Helo=[ld-1.internal.tilera.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR02MB0769 X-OriginatorOrg: ezchip.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1677 Lines: 44 From: Chris Metcalf This is useful, for example, 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 --- include/linux/tick.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/linux/tick.h b/include/linux/tick.h index d53ad4892a39..29456c443970 100644 --- a/include/linux/tick.h +++ b/include/linux/tick.h @@ -192,6 +192,12 @@ static inline void tick_nohz_full_clear_cpus(struct cpumask *mask) cpumask_andnot(mask, mask, tick_nohz_full_mask); } +static inline void tick_nohz_full_set_cpus(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); @@ -201,6 +207,7 @@ extern void __tick_nohz_task_switch(struct task_struct *tsk); 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_clear_cpus(struct cpumask *mask) { } +static inline void tick_nohz_full_set_cpus(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) { } -- 2.1.2 -- 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/