Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757458AbcCCTkj (ORCPT ); Thu, 3 Mar 2016 14:40:39 -0500 Received: from mail-db5eur01on0081.outbound.protection.outlook.com ([104.47.2.81]:48023 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751733AbcCCTkh (ORCPT ); Thu, 3 Mar 2016 14:40:37 -0500 Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=mellanox.com; Subject: Re: [PATCH v10 05/12] task_isolation: support CONFIG_TASK_ISOLATION_ALL To: Andi Kleen References: <1456949376-4910-1-git-send-email-cmetcalf@ezchip.com> <1456949376-4910-6-git-send-email-cmetcalf@ezchip.com> <87mvqfe7h3.fsf@tassilo.jf.intel.com> CC: 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 , , From: Chris Metcalf Message-ID: <56D8931E.4060205@mellanox.com> Date: Thu, 3 Mar 2016 14:40:14 -0500 User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <87mvqfe7h3.fsf@tassilo.jf.intel.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [12.216.194.146] X-ClientProxiedBy: DM2PR0501CA0039.namprd05.prod.outlook.com (25.162.29.177) To VI1PR05MB1693.eurprd05.prod.outlook.com (25.165.235.155) X-MS-Office365-Filtering-Correlation-Id: 3b9922f7-0176-4ca9-0e6b-08d3439baeb0 X-Microsoft-Exchange-Diagnostics: 1;VI1PR05MB1693;2:W/LwoFWuTGG0g25d3igQMY+B/1tOta46marGz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vQ55xxgs/lIUixMdOzFHfe+3/3lb2B9BwuPhG64SFYI6a2SbhM/jFVSZBO9X5JEXCvWVdj0mlMh+7LSK52WIlBvhW3NwnM3sumzipgHa5KizFrhgOU82jQeW493KZBHwiGtV0i0gzErYBg4aUjJfp4F73TezigJass1lBE8AdYhi/k2QgoTy5wnoPTvJqBRBs4qS;4:VINipX3uA4UDG1DgVeRWPM7RZbVGjzAS5OkxHz3ELWcMYxzY3oXlANX7SZBcIkrlZfHyMc0w8Xxh3U73E6I9swOGCud4ti0kaNcTrbV7o9KsGUrxPmI760Wr3R8P2a4GexlCKOfzG4iYAtcYjDZLjuRivhhC8LT99Wtmupuk+MX0EPyzByLfFNaAEudb/nc+neGKQVeFhqn/ympDNQa0VYG4L3LIMKM1AYHhJr5nsTWs/d3mRV0KAXC/P68gLSaHWHp4jFD2STii0VK5E7vFB8gBV0LIuIke75CfTcGZQGK+NaRo9dVQkN89lCleFohD3TRMSnk2ep4DvaXweGgL20on476WyrvCFSal10651gDt+Em2JqpX5DEYymCrsc7b X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046);SRVR:VI1PR05MB1693;BCL:0;PCL:0;RULEID:;SRVR:VI1PR05MB1693; X-Forefront-PRVS: 0870212862 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6049001)(6009001)(24454002)(377454003)(479174004)(42186005)(33656002)(1096002)(40100003)(77096005)(19580395003)(59896002)(4326007)(5008740100001)(586003)(110136002)(2906002)(19580405001)(4001350100001)(81166005)(64126003)(189998001)(3846002)(6116002)(5004730100002)(66066001)(92566002)(2950100001)(65806001)(65956001)(15975445007)(122386002)(47776003)(50986999)(36756003)(87976001)(83506001)(86362001)(76176999)(87266999)(54356999)(65816999)(23746002)(230700001)(50466002)(18886065003);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR05MB1693;H:[10.15.7.41];FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;VI1PR05MB1693;23:ivZ+BycEpgj0u12zrqekIOMG/fgyiahz7Uc/g?= =?Windows-1252?Q?FNjA0BVl0/n+7NqYD3tf3+qrB8yronJJZYbh3r8tnWvPXeyKh5qanblf?= =?Windows-1252?Q?58WfQHJ6Sr2e1WJ8ukAVdiDvqq6jMtXQtZgBULoUBFyQbghLvdWn95F7?= =?Windows-1252?Q?IRRVMhYsqS6WoVjnAUFE6btQlNpuM9ZYjAlkh9CXj6hYFZ9QQozV9IMs?= =?Windows-1252?Q?nuTc/I++nJs9i1OFVuOw6IqOmfyLl//RuooG6BvCElDuMZbudYharbvC?= =?Windows-1252?Q?+yK15A2QFK8i/SXFFq5MUIMZoDN8HUezzY/UQw1hrFak4ZH6ap8DLnx5?= =?Windows-1252?Q?+gV9XJ19OBR8obOTm8Wogd+GmvgwkMraxeagutd50Mhy3oiJBy7tj0rz?= =?Windows-1252?Q?a8Q/vM8v5F96CycH0pOFRm/5EiJZPr1tNliYwaoTX6bRLp1oz+Rnutrv?= =?Windows-1252?Q?/pgWIPmXlbVXqksneNjJQY0W17/1ir+dChTClmoYw9eh3E5GVDo/lvvd?= =?Windows-1252?Q?VRUhGuEmha8SByPgxefXkC5MBUTcKVRgkO2CtO9lbHxspDaI/FPn4bvg?= =?Windows-1252?Q?W5Qd8QWsbP4OH76g1hj4dcY3rcj2J6twlwgXa8H1I68UZRrrqexjJein?= =?Windows-1252?Q?6eITrtHCmEd8SgOkaXZyvHxlix0/wgYq46IDN0ZE/akJMR6tKc/oj8vT?= =?Windows-1252?Q?oLmJnfNFhTPExh4P7sNlCCK0E/fROnN7776UkJLqDX4ZF90Ix8bVK2XY?= =?Windows-1252?Q?3EHtUl5i47RQtyyA83dA9pR0oRz3WsagzPDg8wf5hZCQjGf4Nl4HQ2xV?= =?Windows-1252?Q?8o7vcg522V9ABigicjTCzYCXf07efY3t7H8ZkEUHlHGksEPRuT04Du8h?= =?Windows-1252?Q?9gOLIQwCXKV1yT0jplchTNywZRHTjpqPTWVwhNLdtPHZmCS8sgq3trQw?= =?Windows-1252?Q?uFkuJzKkxV0vMJqW4/T+B00Qe1M+yXSaP+DiVY0Q4zGp2fwwc1l2LDcS?= =?Windows-1252?Q?h0BcLLyJav1+PnWOpFT0Ir6AEz6kMYzOYMEXFTMSBFch8yKif2UZOtPa?= =?Windows-1252?Q?kwR1S2W2TMEExeBd9iJPieMsoCa2gYNZMCEgf90nwi5n5yxEoz2MzC4y?= =?Windows-1252?Q?vdzU6Tfk/ex1+679D6k77J1P6VDVxYjASW4YWuHdCTkT3uvf/AGwI5ic?= =?Windows-1252?Q?vHiL4k8wGopMRF1hfCS1EG6puGRM1mRSADswuqkdpzOQeyO7DXCLtk0h?= =?Windows-1252?Q?gZoCTkAPZmj6Z0QXHkDevyPUD35nHK5GzO+bEFLHunoIgQfpoKRw0xxs?= =?Windows-1252?Q?8ADkXRWIsmbC/GaD5NI6R1xrQ=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1;VI1PR05MB1693;5:6xz9zJEKjQ8NWLifTzUI8c+5n25/E22tD5gRxkWI1wodoSz6rEhMM0vPfkhkVrp1A+qSLvouNLvhw3M4CB9SlwbdRmFmUNx3aiuiMf7emHCpd1ppRLjQEGpCQSdG2G0QupHgbVijPdpchUkdmCb/tg==;24:2bnp6Ab57miq8+lvIkNPtmOy9o3exu9+1F7ikFkMp3sCpcazrMiitjSVyDBYw1j6aF90e0wqvlCSuuZPdNSIn+mUmIA0h5acIbBJOVrldgM= X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Mar 2016 19:40:27.7104 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB1693 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2048 Lines: 50 On 03/03/2016 01:34 PM, Andi Kleen wrote: > Chris Metcalf writes: >> >> +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. > That seems like a very dangerous Kconfig option. > "CONFIG_BREAK_EVERYTHING" > If someone sets that by default they will have a lot of trouble. > > I wouldn't add that, make it a run time option only. So you were thinking, allow a special boot syntax "task_isolation=all", which puts all the cores into task isolation mode except the boot core? My original argument was that it was so parallel to the existing CONFIG_NO_HZ_FULL_ALL option that it just made sense to do it, and some testers complained about having to specify the precise cpu range, so this seemed like an easy fix. The commit comment for NO_HZ_FULL_ALL (f98823ac758ba) reads: nohz: New option to default all CPUs in full dynticks range Provide a new kernel config that defaults all CPUs to be part of the full dynticks range, except the boot one for timekeeping. This default setting is overriden by the nohz_full= boot option if passed by the user. This is helpful for those who don't need a finegrained range of full dynticks CPU and also for automated testing. The same arguments would seem to apply to TASK_ISOLATION_ALL; note that applications don't actually go into task isolation mode without issuing the appropriate prctl(), so it shouldn't be too dangerous if users enable it by mistake. There will be some extra checks at kernel entry and exit, that's all. So on balance it still seems like a reasonable choice. Thoughts? -- Chris Metcalf, Mellanox Technologies http://www.mellanox.com