Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756091AbcCBUMp (ORCPT ); Wed, 2 Mar 2016 15:12:45 -0500 Received: from mail-ve1eur01on0042.outbound.protection.outlook.com ([104.47.1.42]:14087 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755038AbcCBUKS (ORCPT ); Wed, 2 Mar 2016 15:10:18 -0500 X-Greylist: delayed 165415 seconds by postgrey-1.27 at vger.kernel.org; Wed, 02 Mar 2016 15:10:17 EST 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;ezchip.com; dmarc=none action=none header.from=ezchip.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 v10 05/12] task_isolation: support CONFIG_TASK_ISOLATION_ALL Date: Wed, 2 Mar 2016 15:09:29 -0500 Message-ID: <1456949376-4910-6-git-send-email-cmetcalf@ezchip.com> X-Mailer: git-send-email 2.1.2 In-Reply-To: <1456949376-4910-1-git-send-email-cmetcalf@ezchip.com> References: <1456949376-4910-1-git-send-email-cmetcalf@ezchip.com> X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CPI:12.216.194.146;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(1109001)(339900001)(189002)(199003)(36756003)(11100500001)(4001430100002)(586003)(5001770100001)(50226001)(229853001)(5001970100001)(5003940100001)(47776003)(48376002)(42186005)(2906002)(50986999)(50466002)(107886002)(2950100001)(76176999)(4326007)(189998001)(2201001)(92566002)(87936001)(33646002)(1096002)(5008740100001)(105606002)(106466001)(6806005)(104016004)(85426001)(1220700001)(81156011)(921003)(42882005)(2101003)(1121003)(83996005);DIR:OUT;SFP:1101;SCL:1;SRVR:DB5PR05MB1525;H:ld-1.internal.tilera.com;FPR:;SPF:Fail;MLV:sfv;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;AM1FFO11FD013;1:A5OalXnd8AvfFiReAwvydgk/gjG/7zzCl6pFVqPKMoC0EQjfVi+wriC1Cx9JNfXbSFazxU2vup16h8a2wOOG+rJDrOTpJNm8b1DQkszZ9VgX/Co8NERvOzO8bfjDAaBmaRNqx7SXOHPQuQoSaOePwD+l9jMDyQW5KyBq3qsn9fg+sfRKVpQOwACRC4Jz5P7lpFXR8SdrAiCXPNsxJgq0FvLQNEnU+WaJj4Nh9CV3jhIz1m9vBfJERXm/qAYyM/mQ3lFs49r1q39/fSDiGJru+UbzrkZItlifeOwYy5pTawI8OzvUlwvKwaXrvKbY15t6SirZTgVLsPeoOzIh5IPX3SLowmz0YbXKbWasqPeLuitHKLcdMKNCqRM+8gJ5wttPp6iWI2DzxmyOHLQO1TO8QXxrynm2EbgugY3Rm7VRPOGKJEjZVaA5c4QgylKGCZN08bEs4/X4qy1baPZEXYgyO+35UIriNyEwlpfQkT7LZ+Im/36RK3b7Z+uGcTDdBDuo MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: bf9a0e53-99ee-4419-12c2-08d342d6aa78 X-Microsoft-Exchange-Diagnostics: 1;DB5PR05MB1525;2:7zThM2n81zh46HT5Vx0fG3mmBGZbzbS7+TJ6DOQXIGJNERJxmoZvF0jdPABUB91z71O8lMSTBshwcnQTFKVIhc8FilAHqbiAkDVyONjoNq2LOMK1I2Mt910vLjetSwMYaF8qPRQC39heiq9CJlwmARTcaV5mE7vs6QiicumNfFrsCJNHmY4KFJGzkTaZMMoa;3:DjkuBbHAxVkqc3uZwlbSriv6/W4u1iO/Z/ctOz+Nde6zvxQuJqwvaIvOOTBqq95tVzcRNqyoG5Tf50mqw7WKXk/OJWU82vBSMc2TYt9M/2Xxp6hZmB67tO1ZLbuRG9haB/Da1qF24XS00i6CWvhC71oYlRrzboDFY3setRHunrllHoI+LFUjHX1qCs2aVhDz;25:6ptvkW+YOq+OEpvUVVuc+hObBeadrbyxQy6GZS84AWMX3+u8mKOHQAjIvkbKIKVRgXEUhlXFc/n+WeVod5+XwHDXZmyFBlHLqIEopNjK4oXhOLZ7JRguNCnC74MguX9O0KLJfG0V3w8HSAhIy7Z8UKAO4uVvb6Oa1dKm5ElSVEDhX+8oflJcCe6n53U9RPUXdo/mkIKKbMOCj5e3ETg0rVjrOjel4f2TtPsyeaLhuz3nK5XT9S+8leJZ5VS3u5wNauuyLH7RnAtZamB/7VHvxV+3Rsb+q2fa9kWOFciRBsdxyVwz3DoVVCmicZ2olaCQz/ZV6c7xEpGj2UrAYpZB2Q== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DB5PR05MB1525; X-MLNXRule-EZCH-Linux: Rule triggered X-MLNXRule-Acc-Dom-4: Rule triggered X-Microsoft-Exchange-Diagnostics: 1;DB5PR05MB1525;20:4D90MvVIm4Jpi7vaYK03P7HHkjCnqYZbknRRCZ25NSF2e5fq2pI2BiXGjOzSRKGeRb0jZxI92mxP033zxMHd6iNGVi06VNLzqydPQx23F/Oq3WQXNCjB3MNGFyW0MTyH+nahiTZ07RBf2GpqEOsjNosLJMbFwXsV5Br0hLbdhsRbsN0OmP4s3wHgPP2L1IrTUBMurRb4f7vMMw91gymtzKGmh0cVvCinURGNri+Uf6zhVxtIf/ORC1G64hr0K6xnLj+CmA6G6D8NjjTUk2cBq3NZ8FxNuJysN4XIW+gynn1KjRGUaruQn/HbXYX0fQj14Pr0U5e30rcjxFOh8HVyFQWJaDaEFTELtNfB3iHkVZwWr7eIk/w2iIn6q9LrmKpQCb+S3Cfdz7l3AHI/v1eK4mNaanc+++q14ngLnZQRLfV27qhkR0EEqs9k80YkbO7+U1p3182PCVWJc5G+VKnUFbw/DpRM060LuQJ+RlRzoKj/A4kqwZgZcYTRnXtA+JfTF6blAWg8nOf9rgBeAn5JObWPmAGEuz2vmJFzJ8H8sVEY7qcbErrewPWh5m2E9Kq1/erwWhtZkENCZyc9SbrOY5n+IoRvENrzfgII6xi77bs= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(13015025)(13017025)(13023025)(13024025)(5005006)(8121501046)(13018025)(3002001)(10201501046);SRVR:DB5PR05MB1525;BCL:0;PCL:0;RULEID:;SRVR:DB5PR05MB1525; X-Microsoft-Exchange-Diagnostics: 1;DB5PR05MB1525;4:256jnnCin85ZJ5jGfF5sKWs/ziIPnMIS+1ta6AVxWUnIv7KLzsw9pOn3QwPm9++SvgjWPT64+g56DOVRnxxl4ls61i89oHmxY2VtpqLC4kcQY8eb1BXskOelyaQqYW8IuLtCIBf4CUin5v8g2xZCfo9K5FSYy9yX2a5C10plLolb2K7F5+JAzA4w9+oF6YsFnnFiwka0Wav7Z4JGxEgGTWjeNj5/CwHlCV65aSAdO0KUhuyyf5nMrzjU/ndJat6PT/Vv/qX5WpXEL5o2MWVxvx8TBAfbEyPNewpAlncMfO1L/p7cQjIQBc8QmRUsoSNm/n7gIleZHQaFaHrnIOO8gRy/9CZsQifFroyTr/K0d56lo2gaD/lnKUMjVn4UuBctSkWa4iRjs8s3SJRDPPqI1WpePS/57uqYbTJ7mi69jf1qjsE0tTHdwXjA9zPNI+ldOgQzZPlbWsQhPxTgIsGLDg== X-Forefront-PRVS: 086943A159 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DB5PR05MB1525;23:I3VznLC00utava00mnlFqw+DyufoRx9sGnzac1txZ?= =?us-ascii?Q?lgOtWnqpAJ2bhtB0EYrGb/M02o7XnM9OQt4EXoH/W4S0qhKGWXc0l4ytlWA7?= =?us-ascii?Q?GL5xU+6lw99qO0qynNLpgPn5eUgiXVdVvAFKxOCRLnm8TbgPZP2N43CWYizN?= =?us-ascii?Q?T0b4GcmnFIeKojvLc/xkq55V8ex+s9QdovsDe8vConG7gZ+XdP5Jn4ZYhGCs?= =?us-ascii?Q?qYRhpkPN9fbfp0OmwoNEGEXv9G0pGuZCDvE5G04CMBxqU2oCvB8xiAUtqB/n?= =?us-ascii?Q?15/t5NHH6WLmTXRzWtuFIuIhAWtGeeGZe5UfrEwiiUJR0cJCzFe8pcdDfmkx?= =?us-ascii?Q?Iq+UeGP4+drqweJYQsipePvTlsFo7PAry6L//775gy7EwImVrKnau2Xm5Ewp?= =?us-ascii?Q?240PxZs+hbQwgasFpf/2/nMCGaLDRbacECvkkB9KcwGXwSDD8He3HJMxods1?= =?us-ascii?Q?E5XI2CF4N2cPqcQNGNcgPhsYXQicUxf5y37FfdP9JFzvd763A9iKl37fzDVz?= =?us-ascii?Q?Z2RpvhFH0ODpo7eqLqpvjguf8okIdkyrVD97eQdDdrHRlalkOqjPlKjSV2bf?= =?us-ascii?Q?cdUY972Co3wV9GozEFgHminP/oglK9UM6BZbkcugaaKLHc2GxNgGnf5N+4Ul?= =?us-ascii?Q?soNNRqfl19bMLeqqOCOchoDZwsdeNY5oK2hIsTrMBo+CbStejsnjwltfeJLX?= =?us-ascii?Q?Og9VGtKt2IayXagpH7lzMAZ86B0IMdACEyyBbtP9MNLHYXAmM3AVU3ODg0p5?= =?us-ascii?Q?f2qLuobtbu4Junscux+P73SETzJIg+qX7B5R+oU3JhY9ZAKMiRtumSCx9Iw1?= =?us-ascii?Q?wuXt/vLMadN+MFW2G4v4dY3xgDb5u+UzWSk342zIvOfgZ6zCEODpNGfZFcZP?= =?us-ascii?Q?jgJpXl1zSkrHFGT/lwpiYDGpMBC3Kv1NDbAbdCQW34ezEntk821oUmxlsp/v?= =?us-ascii?Q?C/rAQcu99zZv65JVh0M3WapsqIAsZgxTCHguzBcI5e2kM2PVcBUlmsNL+dAU?= =?us-ascii?Q?VBqZaWA1Xsu36ezKJNRtxV7uS2x0C+WBEeKc5Q94XXG+bqh57XXNpswq3NGY?= =?us-ascii?Q?Ul9c8betpyfs8KW8BEPpu02uNjmVU+K6HIHl5HajNIHK78oyLL1qbyGovwBW?= =?us-ascii?Q?Oli6Lpmi95xDQblYC8nCcSb0K5Jn08q?= X-Microsoft-Exchange-Diagnostics: 1;DB5PR05MB1525;5:fsnEYRA0xr1MMsqx/rC+mEOlTN9WY/DTyXvBVV3lSvcMMhsBTG4V3+fdzhzHo852QLrf3IwOM1OR4PkK9tC7CyWk4/V4DVaWxXRwEDRGonk21Z9Nw+JNbCMFXH6TZgiEmSBcqtT2adAU6liqEsfIew==;24:keKEQjc7Z4aeGIeHWnux5rP5bANDRhZTjvrnlfvOX1SNFFWAjhjTZPDEnV7ovgkBo9HHXDeOgfc8itc7EbwFatK8Hrk7yCMuiGubFfwQ/DM= X-OriginatorOrg: ezchip.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Mar 2016 20:10:13.5590 (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: DB5PR05MB1525 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1595 Lines: 50 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. --- init/Kconfig | 10 ++++++++++ kernel/isolation.c | 6 ++++++ 2 files changed, 16 insertions(+) diff --git a/init/Kconfig b/init/Kconfig index 6cab348fe454..314b09347fba 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -802,6 +802,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 e954afd8cce8..42ad7a746a1e 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.1.2