Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755674AbbDNPSW (ORCPT ); Tue, 14 Apr 2015 11:18:22 -0400 Received: from mail-db3on0089.outbound.protection.outlook.com ([157.55.234.89]:11904 "EHLO emea01-db3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755471AbbDNPSJ (ORCPT ); Tue, 14 Apr 2015 11:18:09 -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: Chris Metcalf To: "Peter Zijlstra (Intel)" , Frederic Weisbecker , "Paul E. McKenney" , "Rafael J. Wysocki" , Martin Schwidefsky , Ingo Molnar , CC: Chris Metcalf Subject: [PATCH v8 2/2] nohz: set isolcpus when nohz_full is set Date: Tue, 14 Apr 2015 11:17:55 -0400 Message-ID: <1429024675-18938-2-git-send-email-cmetcalf@ezchip.com> X-Mailer: git-send-email 2.1.2 In-Reply-To: <1429024675-18938-1-git-send-email-cmetcalf@ezchip.com> References: <20150414003711.GD6121@lerouge> <1429024675-18938-1-git-send-email-cmetcalf@ezchip.com> 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)(54534003)(2950100001)(76176999)(46102003)(50986999)(50466002)(48376002)(87936001)(19580395003)(6806004)(19580405001)(92566002)(85426001)(86362001)(36756003)(77156002)(62966003)(50226001)(105606002)(33646002)(106466001)(104016003)(229853001)(575784001)(42186005)(561944003)(47776003)(4001410100001)(21314002)(4001430100001);DIR:OUT;SFP:1101;SCL:1;SRVR:HE1PR02MB0780;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:HE1PR02MB0780;UriScan:;BCL:0;PCL:0;RULEID:;SRVR:HE1PR02MB0731; 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:HE1PR02MB0780;BCL:0;PCL:0;RULEID:;SRVR:HE1PR02MB0780; X-Forefront-PRVS: 054642504A X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Apr 2015 15:18:02.4985 (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: HE1PR02MB0780 X-OriginatorOrg: ezchip.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1742 Lines: 53 nohz_full is only useful with isolcpus also set, since otherwise the scheduler has to run periodically to try to determine whether to steal work from other cores. Accordingly, when booting with nohz_full=xxx on the command line, we should act as if isolcpus=xxx was also set, and set (or extend) the isolcpus set to include the nohz_full cpus. Acked-by: Frederic Weisbecker Acked-by: Mike Galbraith ["thumbs up!"] Acked-by: Rik van Riel Signed-off-by: Chris Metcalf --- v8: no change in this patch, just in 1/2 Add Frederic's Ack v7: oops, use add_cpus_to, not remove_cpus_from [Frederic] v6: back to just using a direct update, with the new names v5: test run of Frederic's proposal to use sched_isolated_map_add() v4: update accessor names to make them clearer [PeterZ] v3: update changelog language to avoid using unclear "implies" [PeterZ] v2: add Mike and Rik's Acked-by kernel/sched/core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index f0f831e8a345..4a5681b5a4fd 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -7031,6 +7031,9 @@ void __init sched_init_smp(void) alloc_cpumask_var(&non_isolated_cpus, GFP_KERNEL); alloc_cpumask_var(&fallback_doms, GFP_KERNEL); + /* nohz_full won't take effect without isolating the cpus. */ + tick_nohz_full_add_cpus_to(cpu_isolated_map); + sched_init_numa(); /* -- 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/