Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759740AbcDERnO (ORCPT ); Tue, 5 Apr 2016 13:43:14 -0400 Received: from mail-am1on0084.outbound.protection.outlook.com ([157.56.112.84]:56098 "EHLO emea01-am1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751907AbcDERjP (ORCPT ); Tue, 5 Apr 2016 13:39:15 -0400 Authentication-Results: spf=fail (sender IP is 12.216.194.146) smtp.mailfrom=ezchip.com; mellanox.com; dkim=none (message not signed) header.d=none;mellanox.com; dmarc=fail action=none header.from=mellanox.com; From: Chris Metcalf To: Gilad Ben Yossef , Steven Rostedt , Ingo Molnar , Peter Zijlstra , Andrew Morton , "Rik van Riel" , Tejun Heo , Frederic Weisbecker , Thomas Gleixner , "Paul E. McKenney" , Christoph Lameter , Viresh Kumar , Catalin Marinas , Will Deacon , Andy Lutomirski , , CC: Chris Metcalf Subject: [PATCH v12 05/13] task_isolation: support CONFIG_TASK_ISOLATION_ALL Date: Tue, 5 Apr 2016 13:38:34 -0400 Message-ID: <1459877922-15512-6-git-send-email-cmetcalf@mellanox.com> X-Mailer: git-send-email 2.7.2 In-Reply-To: <1459877922-15512-1-git-send-email-cmetcalf@mellanox.com> References: <1459877922-15512-1-git-send-email-cmetcalf@mellanox.com> X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:12.216.194.146;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(4326007)(86362001)(960300001)(6806005)(107886002)(19580405001)(5001970100001)(19580395003)(92566002)(104016004)(5003940100001)(2950100001)(4001430100002)(5008740100001)(2906002)(42186005)(33646002)(50466002)(48376002)(76176999)(1096002)(50986999)(1220700001)(11100500001)(586003)(189998001)(50226001)(36756003)(85426001)(47776003)(5001770100001)(229853001)(106466001)(87936001)(2201001)(105606002)(921003)(2101003)(83996005)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR05MB1535;H:ld-1.internal.tilera.com;FPR:;SPF:Fail;MLV:sfv;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;AM1FFO11FD025;1:RmltXJpRgCU1hI0jK8IR6pAfU2ImMe765HpxNDQMokjdDl5klyvzPx7xe9Gz1z9AL2JEuF2KwmUNb8lHJTbgYqZ9oO3CDWoNVSobRgPxodp4lJCnISiaRNUqujSv+Yh8OJwsGOJMpSnPdiPVv0bZIPwHY3sE9kjhmiXK7szN+jJ3ImOcEbENb0+JhvEManuDxoZnS1QYwcJ7H0tbDhLmMCBQYBWIaAoYLnNXZs/RdHX2T74lwgEXQRGtzbRwzKiT9akcJA8MueZ8wGzYBCzPkUx+R0n7fozaBOkeTcNPxzQVHcp4Uomk/fG+4xScv2ofvVUk20M3FZszGgGnBGFueheWnU4SiZyPkJ7CDrBnwrGd+1crsjNAXGktG5vUAe4oxiEZxoHKSB4xHUDm8UgFtwpon8Dvztx8AkkY4PIq8R7nki+pfKqZMxIFWsjvrt3OtMwazeol7d2NHdovks9Bkocv0DnbyTR5hzjGcxVZMEc8xQqf7GpNRK38Zj/V1le7SH6u8lO+9bn95+wdsYNItXfCS9LoPu+suZ2Cd5xfmEt012mKUsfSCykpsxpo8pez9q92tMSSlp8hQM+5n1GxMoF7XYYtBsDZrHSXMQGeaC1TGOjPS1qsMTKeESTdU+W5NIB8mkUJ1fhC6ymg7XiW3w== MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 1930691e-06fb-43c4-ad97-08d35d79323a X-Microsoft-Exchange-Diagnostics: 1;VI1PR05MB1535;2:yGdEon+0sIzhuMKeeQcC4tlWs5HaEPRnLOpp7B41hJmhyQ7UJEM8kQFPVVk/WZ/wrOYyLP0tveqUlXb+W6l9lArwqoREw08jR/cNrm8kBKabBccIf0BLjEyxKZ7v6ViIjywmckLihKt5nwK+yRE6E3jTOcWMsdwIl8tqBDDiR0Q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yRUrJgzMmqom48BTdAgH0poohG3vcjjIQlX1uv964nMYxdqfiv3BazL8KyUgNk/4Tsb/EYv7N0iF0ExdfNhhLXhaPe0fLQ46CyATdzIHgDzTWMbV528SW/3iz3DiA4Z1U4Ha+GZhTAlyTfaiZF X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(13015025)(8121501046)(5005006)(13018025)(13023025)(13017025)(13024025)(10201501046)(3002001);SRVR:VI1PR05MB1535;BCL:0;PCL:0;RULEID:;SRVR:VI1PR05MB1535; X-Microsoft-Exchange-Diagnostics: 1;VI1PR05MB1535;4:WaHgmbbK4D7zGyy9BNlvTzuF64aPGLGTmueB7cFub1JLfy1wdDeEklIMHGeromay6mvOaQvUKdoNPefLsde3VTXSwc3pO2UqDlPQX8V5Y925wPyKwTDd8tUNdYL/LxXd6AdL1le7d6WPTFcq+ij1qrpdkw6yIA6YJzmY5z56AViMshkfH10NdmjIdXGR/PYof3BEm2mQb1s4cpjSEghMd/ri6NQHuYxn9+qZAo03sV3J0+hZKUE3vxC7HK0yb1w6QPe/dZOKRPFkAEJMk+DuNvymbW/da1VA2KgDjOn5+IAHbULX8+M6uS8v1SYcFMOY/ClgCgUYOKykHno/7dpiR/gIP8BOKrHRlmZ34C49S2Jq0WQO99RLkN1G/3/wVyxZwrs9qYkB2zB/frn4dedzXEkL56pjNwqwUFDOixW6ZofaY2OV2THXKcn4dYO2zmlirtmZd+3pLnF6YJRIDArlBQ== X-Forefront-PRVS: 0903DD1D85 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;VI1PR05MB1535;23:jh8JUxLdLuRGwk9zjx14yZYmSWf3Ztq9lNrluubSR?= =?us-ascii?Q?Mk3gKzLal/9XSqGKGkcu/nYDgFaBGLL3zoCx2I5884WyWpNNw1fOeJW60IMu?= =?us-ascii?Q?ThE/Ph27FBTFtagyOW+ggF6sZaNrZKyxN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Iv89ztzIKPplRiISCi7Hee0FwGp6ubmKF3iS3Fv4kk7YBDt?= =?us-ascii?Q?fQsuHJn646u5XqTGaRmg52huRVdrVzROz3cq7MRkKnDUYFm1BDRhZxhA+O/o?= =?us-ascii?Q?wK+wFekyGIDuCE8PAGI3NeyOwl4rsbaSnus2h6qo2lhenEZQcc2XooErT9Tw?= =?us-ascii?Q?0daUAYNqZ2ppJIrLDaKByEp2xNKMh3K9cgBRzxyqyTdSSGdc+i8z2Z3Lw=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1;VI1PR05MB1535;5:/87mflCfxdORzbP8YltuUCEG9PxgJRWFXtFiSGrwjj3OL7TjZ9mjr7bB5kcjbvUHOXwD8mpI6djm79tHnFKHQCF3kHU40EFxUFLPwcJb4W1Pf0z1uvU9fEcpu49yHMDD8UXtiiGA3618BUsYE8pbvQ==;24:IQhuwR4Wm+DgSsf/VYqODqis7s/IC1Em0oxY+yPtQW9wEdn5YS3oH8c7S9u/b6L35DZTnvHeImg+3XPK7alyFnZlPuHvwpCmiSAuTC8FF18= X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Apr 2016 17:39:10.0292 (UTC) X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=a652971c-7d2e-4d9b-a6a4-d149256f461b;Ip=[12.216.194.146];Helo=[ld-1.internal.tilera.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB1535 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1649 Lines: 52 This option, similar to NO_HZ_FULL_ALL, simplifies configuring a system to boot by default with all cores except the boot core running in task isolation mode. Signed-off-by: Chris Metcalf --- init/Kconfig | 10 ++++++++++ kernel/isolation.c | 6 ++++++ 2 files changed, 16 insertions(+) diff --git a/init/Kconfig b/init/Kconfig index 767f37bc3391..b2717e505157 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -805,6 +805,16 @@ config TASK_ISOLATION You should say "N" unless you are intending to run a high-performance userspace driver or similar task. +config TASK_ISOLATION_ALL + bool "Provide task isolation on all CPUs by default (except CPU 0)" + depends on TASK_ISOLATION + help + If the user doesn't pass the task_isolation boot option to + define the range of task isolation CPUs, consider that all + CPUs in the system are task isolation by default. + Note the boot CPU will still be kept outside the range to + handle timekeeping duty, etc. + config BUILD_BIN2C bool default n diff --git a/kernel/isolation.c b/kernel/isolation.c index 282a34ecb22a..b364182dd8e2 100644 --- a/kernel/isolation.c +++ b/kernel/isolation.c @@ -40,8 +40,14 @@ int __init task_isolation_init(void) { /* For offstack cpumask, ensure we allocate an empty cpumask early. */ if (!saw_boot_arg) { +#ifdef CONFIG_TASK_ISOLATION_ALL + alloc_cpumask_var(&task_isolation_map, GFP_KERNEL); + cpumask_copy(task_isolation_map, cpu_possible_mask); + cpumask_clear_cpu(smp_processor_id(), task_isolation_map); +#else zalloc_cpumask_var(&task_isolation_map, GFP_KERNEL); return 0; +#endif } /* -- 2.7.2