Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759072AbcDERzA (ORCPT ); Tue, 5 Apr 2016 13:55:00 -0400 Received: from mail-db3on0077.outbound.protection.outlook.com ([157.55.234.77]:39840 "EHLO emea01-db3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933235AbcDERyz (ORCPT ); Tue, 5 Apr 2016 13:54:55 -0400 Authentication-Results: spf=temperror (sender IP is 12.216.194.146) smtp.mailfrom=ezchip.com; mellanox.com; dkim=none (message not signed) header.d=none;mellanox.com; dmarc=temperror 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 , Daniel Lezcano , , , CC: Chris Metcalf Subject: [PATCH v12 00/13] support "task_isolation" mode Date: Tue, 5 Apr 2016 13:38:29 -0400 Message-ID: <1459877922-15512-1-git-send-email-cmetcalf@mellanox.com> X-Mailer: git-send-email 2.7.2 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:12.216.194.146;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(189002)(199003)(4326007)(86362001)(960300001)(6806005)(107886002)(19580405001)(5001970100001)(19580395003)(92566002)(104016004)(5003940100001)(4001430100002)(5008740100001)(2906002)(42186005)(15975445007)(33646002)(50466002)(48376002)(1096002)(50986999)(1220700001)(11100500001)(586003)(189998001)(50226001)(36756003)(47776003)(5001770100001)(229853001)(106466001)(87936001)(2201001)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR05MB1535;H:ld-1.internal.tilera.com;FPR:;SPF:TempError;MLV:sfv;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;AM1FFO11FD001;1:7TQG7M/QcMVaB+wj4ngABx3/N4V+haygOJ+GUndX/MubEkC+Ak3e3xx8Af3qZPwmXcj1OjpBpbaZ+RxPVoqrlNBrfhlgQ5nnfREF5yFjsDQoJuGjhtxH5dL+zqzaueECelutm7npkoW89t3fAUg5emjMP4KgC1UX+oiD2bYBxYLwxoZ7s8TMOGLhCY+oSQMcxS+Hh/3eNgnAmyTYG2OnSrpdBalV9Do0WBXNEMFJzMGFUGXOqqAgy3BfzM6GtwkGlL5HTqr0JomGG5oTFKq8VnmTbmx+W4h0QwywufhlVej8q2KCebUnSPnpeV2LuYi2Der6UxwXSH1VBAh/ewh/L/ClTpRQkyVBiGHNlL5tASXvMsjrHCP31c8EI/JX5FvSUDTs6wuwLWe27NPfERvEdhjruQJamTEDSkLtlojVVxGkFdHj78OR9VESgp224flX9TcAu2tcYny581wCLGkPvTDAMDnmXqJhpplLvJLVgtW98dF3I/xdMiQK5pk8TOC4dzP4lw1V1n0NkqyXJwT9Vhl8rUCvVISHFw4270IJo+0CuazBcadjQ2Q173n2aKomYFp21LFR//4x1GnSzD4RMSBGlf4sIUhyg/qhLZscaPufIHAAshoR6r+1bc2GVrIPrYVY8O4OavOQ+n8uzRxWEw== MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: ccdfff69-bb8e-4e39-c807-08d35d792476 X-Microsoft-Exchange-Diagnostics: 1;VI1PR05MB1535;2:WzKKzqt1fYLWmnbL6Vw8qQXTKYMstNWBD7uqgNdm3z7FjiG1fHvmeKnIIRhlr/uRpuUs+rbU7mQbtOZ/UkACokcbmn5m/aJ0QFP0ZaTtx0XlGGaZHHFhs9A4Riysv+Gqk0KgxWo0nNDuo4nOjHgRQL0th/+MY5FPMBEioS2a38WazIO2XbtlrNLMwmOSezik;3:Q9cNAOeFVHsPUkjIdQiNi1nkhkPIe1Jn//qg7bJ8I4y93snlazmio7wr0BfOhmn/pAIA400eI5CxdTS7z8JY5zrhepQ36v8/aOBoAygLZfAgiDRAmlu42r5n1b4J9jDhl2uVFHqsB/X87J+tdt6iJvt0AmnCB0zOc+aQ0AePXmckpCJ25WEU6KP8qMQ8WotnMDeQV3ieY87eSHLUTN0o1us/n92YPld6OmZN4kuZIj4= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:VI1PR05MB1535; X-Microsoft-Exchange-Diagnostics: 1;VI1PR05MB1535;25:bA3AnTZyUFn6DSjExA6oUesXj4EbEHqxO4ly+e6XwcNtagczOKj61lkImPWA8pigPZUj4GZHWqDZ7BAWmUm90Of5XqXG+GUp/T0niOSKIPQ4xtQp5P8ySiMu164Cc+IZbw/lswWiJJQPS8nheyHBH640C1xxeyqS4EhXlqEFPcvXwI2lStY7RwQDz80lDZaguQv8tWd9fB3FvW5GjTWnOCW319t+qdG89/UytEzbPzj1TClK/t6DC9NiinuPhpcUCzuHbqLnSvCtfo+sYE9zqqlRlWVCmXK/zmZEJ1qgAby59WMIzZOxGn8xWyREW54vEY+633NoHzAzTn7AhCLyrxnDipY+pmMJB/E1YxqqucKmsamT4UKYKBEmYIzXGH9OnSPU34vSMYegbS/gUwQXvr/WCOupywDeLqysp3JXCqcO1MPZCTofMxpR9KFfXeEO61Ps8ikswWLo0wLQaL6fVgFKt5AGpvT2TbK6Li+0feFdhzyOwrA+Ev0Cbbvmc5Nv9+ITWghGIi/SJ3NfHMz+Ry/+2RMSEewykULww1K68u9m+AOH+Jaz0x35ZnUMTLwy7l4kq/6tLuBXJMyKF4PPLmSbbEBvMvTyOj2nXGkDRnEnRddWQ7vcZof6hvH4upJbgpq3rgaIVrqJ6KJEXsezRqfu8S9k8aqb1B3POMXFeVlGqMykaFLHy4brmwDuvtR3ohmlpH7UhUiqrH+47sNYvDm8EtXTc1eLlbZF9gyjvRdHy+06Bg9Bo6x5FDaP5f5W0sZ4DXRiy5NBndN1oKK+uw== X-Microsoft-Exchange-Diagnostics: 1;VI1PR05MB1535;20:RxPY4zaZomgmQdCR9lbMGYaEh/4T0bmjVzPxoa0hhMnl81qIFhkEC0mS3WiR01/wHa2TK0Hs5QClfAITvBYgSVTH6VhKtQuqoQa+Sa1uFN1owMfV5ovgPhxBzgBKV7ZtbgQnD1qRNXXoWCXaghaOb/YTJ2Y4j3mTEjKbzm8Iyl+u5NEl8nRgouLyvqzuARoQR4A7fyRXTT9jdcK9h+lUI9ppVj7gk1TNy80EbNi8gO7RnnKiiAdObrimRykcj/uLAJclk4jpmUlJIp4JtmYX53XMNX+VCuG1q1xHQUXR3T1ECyANRlpVl2YXJwsLsHZb68qOYdGgJ1v2WGasgYFbbL3muwF5bJWHW8g5B7aU7500AUlkOKm4XplqyO5LFQu8FRCYT9SkEnJWF8tGi+GVQVIsd8sRa/z9z0WpuRdd+dcPB57/MfRdNvGTsbK9kDKXkHDzdgo1WImjm8/CpOTzWWyTfUZG5fSwMe5P5JZwF7R8jYvtntrn+Ek185VPKGUI 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:J3lT9GdGj0IqaDOPETn2AqAUAqcMRinztSx5Sdl6G9jEHIdrBZ9h6UreTslp1DHKgnkeuyF7Pl742HquLDa6IB16i5IwD+xQ79TYtb60hVyKlgJ+WJ+dwDENPzgeRtvZBo45xMlpH+ixLrpvJv2JARkHaOs3I3MfHBhIZIkoWxU89BxJesGqE2NLRCl9tbwOJRLijvOB57z25OTP/SoIC2UIZDwgdGIWcYxwPk+itli/Ee0tceaum330E3zGEK3Tr1hpAM2AjFYEO2ls4d1+lCpRE04TRchfZzoukpVA6JKTM5coBzMrF88w53zPWLJkf+02vCC47Xm7Sm5qe47sRtJWq8Az/9/RRRt3BqOMFDDc0SrYpAc9QYF69+N1J61PuRLHg2EY/TDeBrmxVzY00zt+T3gQOGqXKzs2noTmg9toxEtq6XcikuyCSA7200z/PDaiH5mS3KmfAzT69eB+Hw== X-Forefront-PRVS: 0903DD1D85 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;VI1PR05MB1535;23:z7gfYooCbRSCq2s1EoInBxe85xNPoFM78aZQ1E5sq?= =?us-ascii?Q?SyQBAN8azvtwSa28nn0AyJChP362V6ZdTY+C47EA5WDWxzwe2/4iRL1XbZns?= =?us-ascii?Q?lH0SyHj6irPHgcMY4+CR6xHSGFwmPjrJtG6knhkx4fXmzcgCcPUOsdmGme/v?= =?us-ascii?Q?wc8lzrpURKv20pLoY8JqdODm9HG6kqghrGFTG5YWAGuy4kUEYIFCH1iLLd3U?= =?us-ascii?Q?7rJ61/pel01k8cLtnVGgsBQCcjD3wdru5HRVXZhY7E/mfjSutpvKO3IT4K2f?= =?us-ascii?Q?wukvd+LZlqzkh94+kl6RfbELUMgApIvz+MONQjzSbfh5hMwSbvIF9YAI7RwC?= =?us-ascii?Q?7J0Wb6nJfdmHk+YBvynYzhD0ifBp2OglRHh1YP98NrFpTsi2kt2xdZXUsYS0?= =?us-ascii?Q?eAKkFk4rx323HSflVX7i1ZREB1oTQzjbRP6dsZfdILk6h4bFnQ91VhN72WMJ?= =?us-ascii?Q?LDufjFHR5JWWymzYq1Vf7LVTtmdyIoJE6W0hCVzv+jXCaYPnO1CkTyXpBq0d?= =?us-ascii?Q?vFI9Yj85W8ER2/TWU7JpyrnUAY4GlvLRJk1ZMc1TGDAPkjKGtb3wtgZUU38M?= =?us-ascii?Q?fBcSRMTD7d9j/rDcHSA8MiDPlWvGPaK9OBAaeOm+IQpIoAGmKgd6bnxuM+fB?= =?us-ascii?Q?1pN7a0KAwbP61B+FOzzrxtH7SMgVOV6xcLTKPfMRhN94w/TwaV9XwQNMQ1Kg?= =?us-ascii?Q?ShUYmxNI+4Lkom0ssIsRG+It4RMurN0SJ71jkbbtsDFsFR0sb1f+cgj9iwII?= =?us-ascii?Q?JeV5qVg7QZofDFKecYx6BAGKxArPs+v9zV/WZe7o62GwFeye4KAGpiCjChau?= =?us-ascii?Q?zIDwlNSOhxXeQ0Hv+3fKKf/O228OwFFBGzBr42Xnpq8T0D4L88DR7ie2edW/?= =?us-ascii?Q?gZlhk1beW3uVe3iKqWvSo7V2Efhz0lnzveQ08AsjLwJ19a4hNNprVVSul0x1?= =?us-ascii?Q?AxkcLbuAzQLUJyiewcB4tsRasjOySkhqzmZMgtdCq+us2lzFRVJj2P3wkjQH?= =?us-ascii?Q?qGtTU6QF/zoI/bVQ6HF0MQV20XElgYchuP6v3RxiEj5YBcNpW1RuY2Vx6YD6?= =?us-ascii?Q?24I+ec=3D?= X-Microsoft-Exchange-Diagnostics: 1;VI1PR05MB1535;5:3S+undhCDoRVw9SS6Iy0kkM7rpgbypG9NcnCv67uin4K1D8Vp75zzHiua0klFpxt/jjV3qNjy5zCDOS69yVGmoN7qn7B5kKoY3wZTyn0ndWWUdtiXjdEAnIhKd3c6cbZpT/1EL4Q03xJxDxVNGfWog==;24:LSGx+c8tKO0IL/r30h3BvLITa9ybQwG4xhG51gwa4lYAmDjuVPXLXe/Q7P4xziRm+BLKVQD5PAuSuA8FQwFzoH7Yz5QpyzEN41haTgtgF0A= X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Apr 2016 17:38:46.9350 (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: 4788 Lines: 107 Here is a respin of the task-isolation patch set. The previous one came out just before the merge window for 4.6 opened, so I suspect folks may have been busy merging, since it got few comments. Frederic, how are you feeling about taking this all via your tree? And what is your take on the new PR_TASK_ISOLATION_ONE_SHOT mode? I'm not sure what the right path to upstream for this series is. Changes since v11: - Rebased on v4.6-rc1. This required me to create a can_stop_my_full_tick() helper in tick-sched.c, since the underlying can_stop_full_tick() now takes a struct tick_sched. - Added a HAVE_ARCH_TASK_ISOLATION Kconfig flag so that you can't try to build with TASK_ISOLATION enabled for an architecture until it is explicitly configured to work. This avoids possible allyesconfig build failures for unsupported architectures, or even for supported ones when bisecting to the middle of this series. - Return EAGAIN instead of EINVAL for the enabling prctl() if the task is affinitized to a task-isolation core, but things just aren't yet right for it (e.g. another task running). This lets the caller differentiate a potentially transient failure from a permanent failure, for which we still return EINVAL. The previous (v11) patch series is here: https://lkml.kernel.org/r/1457734223-26209-1-git-send-email-cmetcalf@mellanox.com This version of the patch series has been tested on arm64 and tile, and build-tested on x86. It remains true that the 1 Hz tick needs to be disabled for this patch series to be able to achieve its primary goal of enabling truly tick-free operation, but that is ongoing orthogonal work. The series is available at: git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile.git dataplane Chris Metcalf (13): vmstat: add quiet_vmstat_sync function vmstat: add vmstat_idle function lru_add_drain_all: factor out lru_add_drain_needed task_isolation: add initial support task_isolation: support CONFIG_TASK_ISOLATION_ALL task_isolation: support PR_TASK_ISOLATION_STRICT mode task_isolation: add debug boot flag task_isolation: add PR_TASK_ISOLATION_ONE_SHOT flag arm, tile: turn off timer tick for oneshot_stopped state arch/x86: enable task isolation functionality arch/tile: enable task isolation functionality arm64: factor work_pending state machine to C arch/arm64: enable task isolation functionality Documentation/kernel-parameters.txt | 16 ++ arch/arm64/Kconfig | 1 + arch/arm64/include/asm/thread_info.h | 5 +- arch/arm64/kernel/entry.S | 12 +- arch/arm64/kernel/ptrace.c | 15 +- arch/arm64/kernel/signal.c | 42 ++++- arch/arm64/kernel/smp.c | 2 + arch/arm64/mm/fault.c | 4 + arch/tile/Kconfig | 1 + arch/tile/include/asm/thread_info.h | 4 +- arch/tile/kernel/process.c | 9 + arch/tile/kernel/ptrace.c | 7 + arch/tile/kernel/single_step.c | 5 + arch/tile/kernel/smp.c | 28 +-- arch/tile/kernel/time.c | 1 + arch/tile/kernel/unaligned.c | 3 + arch/tile/mm/fault.c | 3 + arch/tile/mm/homecache.c | 2 + arch/x86/Kconfig | 1 + arch/x86/entry/common.c | 18 +- arch/x86/include/asm/thread_info.h | 2 + arch/x86/kernel/traps.c | 2 + arch/x86/mm/fault.c | 2 + drivers/base/cpu.c | 18 ++ drivers/clocksource/arm_arch_timer.c | 2 + include/linux/context_tracking_state.h | 6 + include/linux/isolation.h | 63 +++++++ include/linux/sched.h | 3 + include/linux/swap.h | 1 + include/linux/tick.h | 2 + include/linux/vmstat.h | 4 + include/uapi/linux/prctl.h | 9 + init/Kconfig | 33 ++++ kernel/Makefile | 1 + kernel/fork.c | 3 + kernel/irq_work.c | 5 +- kernel/isolation.c | 316 +++++++++++++++++++++++++++++++++ kernel/sched/core.c | 18 ++ kernel/signal.c | 8 + kernel/smp.c | 6 +- kernel/softirq.c | 33 ++++ kernel/sys.c | 9 + kernel/time/tick-sched.c | 36 ++-- mm/swap.c | 15 +- mm/vmstat.c | 21 +++ 45 files changed, 743 insertions(+), 54 deletions(-) create mode 100644 include/linux/isolation.h create mode 100644 kernel/isolation.c -- 2.7.2