Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756034AbbHYT4Q (ORCPT ); Tue, 25 Aug 2015 15:56:16 -0400 Received: from mail-db3on0058.outbound.protection.outlook.com ([157.55.234.58]:16240 "EHLO emea01-db3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751666AbbHYT4N (ORCPT ); Tue, 25 Aug 2015 15:56:13 -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: 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 , , , CC: Chris Metcalf Subject: [PATCH v6 0/6] support "task_isolated" mode for nohz_full Date: Tue, 25 Aug 2015 15:55:49 -0400 Message-ID: <1440532555-15492-1-git-send-email-cmetcalf@ezchip.com> X-Mailer: git-send-email 2.1.2 In-Reply-To: <1438112980-9981-1-git-send-email-cmetcalf@ezchip.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;DB3FFO11FD001;1:OaNlEHFgthcN7G3CnClRklvvWOOsB11qfuLwb0J0eTuYUKWj7NpugYoTLFdsMn13ga+QkgW9Xv/9ot2JaF3RsZ6EmWKeM6S/b52QtS01bv5F8II6JOI3EM7bfW34GqvUXQ0Zzv/JJvUIbFmkEt3OxMt23S5mpZzi0GSkfVNzTfedpvdSc/MFyoxse3P9zENUQ7ukj55bRMyGIvOUCd7qIskbbzEq95FBvfvYpENOMi3QRxzMIyXtIY5HJ1pJxrq1T9KGW8PQ5U++90lteW3SgAQL8XPEAstf11hfwBrG9WQEJcqjeZJgHakLJm5vZnuWNRkJY+OHS1a3qyiGazwTeMw0vZf0Gjy5HwlWl/iH9ew= X-Forefront-Antispam-Report: CIP:12.216.194.146;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(339900001)(3050300001)(189002)(199003)(105606002)(64706001)(85426001)(81156007)(77156002)(92566002)(50986999)(104016003)(33646002)(15975445007)(87936001)(47776003)(68736005)(86362001)(2201001)(2950100001)(19580395003)(62966003)(5003940100001)(229853001)(5001960100002)(107886002)(106476002)(189998001)(106356001)(97736004)(106466001)(5001860100001)(5001770100001)(50226001)(5007970100001)(50466002)(42186005)(36756003)(4001540100001)(6806004)(5001830100001)(48376002)(46102003)(9376005)(921003)(1121003)(4001430100001);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR02MB0781;H:ld-1.internal.tilera.com;FPR:;SPF:Fail;PTR:InfoNoRecords;MX:1;A:1;LANG:en; MIME-Version: 1.0 Content-Type: text/plain X-Microsoft-Exchange-Diagnostics: 1;VI1PR02MB0781;2:Pe66Uqqr4vAyvN6wuL8r/rlzfYdIVyAUvlrMVoczGmo/NB3O/l9kNenXDCGKC8bwMcZ5E09DF2zzNUn0CLxTKNQ7kwNRSKdMY2CZDzepWNLWwzXNTbPMtYk4prUBDvV6uRY37k+SpbW61TkxZaPz4YGzO98WOKF27VaINzrte7Q=;3:g3zlKSuX4gmOzIVtPzpWrkoY9idI1cDUbwF4BUQ8kwIcXuPBrL43SMy784ahpAYZTMtRnwq38dv8CTKhsEpqWpz8RyUgfEcFi+vpO/GZyNElNPB2zhYoU/JSjTbpUBGI2DSRJuX6kJGw1UJi6wAkKEFo2j3M68bNb2ChbTS8JIUb+Aw90sJvEH4exWHPkpVvQ+loMJPAl2xzvcOyavfptYMLg2hcsPFgg2p/n/DuEwm7ev+tkOiOKx/6X5h+PRtF;25:MPeI2wqk2gDpLJkNGXregAC/usl+7aqKW+7izDhOfSw5fqMjpSYB9plJrdJC5hc+cxRbg7Sl2pQxIoa+pynAw//83+/bUNETYU+BI93MkUQ/sQOnx4ylO0CDh1cmeEoPnMr8L9uxI1XnRtkjmzDn1w+F81am5ztDrczUY5+Xn72YM4Mz43WD7qTiTQ2aeCQ/FyVDrRT1gV/yGKFmsZG8PUu3j2gOKLgII/Rt5zZKRSz5UlBFZ2e8ImiDaXY4WkYg5LrFCdXbSu/1+6npgqRsFA==;20:0DsYmWLM9F0qzpeqb4JHvObTJttAngG+o+z+Uz21vr8kwtcZOtb5n43q8pM5vAJcnkbQP9JBAS57o2Sn0HBwu0f7djI+4zY8YRynMoEDOJ1tniajYZSobr1F590MXdwi0VH5t1hlyELrSU8FZcu6iGEPNW5At8+kD5RHXtVhLB4= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:VI1PR02MB0781; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(8121501046)(3002001);SRVR:VI1PR02MB0781;BCL:0;PCL:0;RULEID:;SRVR:VI1PR02MB0781; X-Microsoft-Exchange-Diagnostics: 1;VI1PR02MB0781;4:w1kWttSU/MtYpfNBUiM8P4cq1v8QRlJi5uyWwkvoyNJzHPm+98IKATaDbxDzylO6O7yxpuW0maz7MXZhNnXD+YNZZ/UQcJ4SYKg3mgKu140rmUiIpARJf1D67adoGgJX2Pfv7C+80HfO7LlfAn5vTgFHmcDs0vK2kVUGDvdGr1i/4p+K055zloo02W7BFauEYAYuEIv21GXASzkbgyOzo7+WX1Inqu5nIKBIsOGssUmnzeMeqDJDHI9TTm9xqgDnm3sn0ekbh587aJXeBNkTWkeAeSSOl127v8eIztDNwOF669mhKiobNj1q0XDyvC0dEeuE5rbuXM6Kz7ANUWBysw== X-Forefront-PRVS: 06793E740F X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;VI1PR02MB0781;23:tMMN05/7CyIteAxH8nj5rysAbcjAFu1Wf/eu6mEQM?= =?us-ascii?Q?EhbQ5qRv+FpOVXqpUxf3fmdcTnmcBZKhqgoJPiRL51kb9/FoB8R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UX+CS91Vo4WV1N3ZnJfxBTdtHH7jDI?= =?us-ascii?Q?NQCwjZivaBE0BSK40um8EezgDGhpHtHMriA/xEN8FrDINPpOeKDTJ/SfreDv?= =?us-ascii?Q?m5KoPRb947jRyNYdosO2Veh4/4wtXjw0/GhAzKEQpdBxauvHDAhVxicxyCRN?= =?us-ascii?Q?Gqtnhibis7Lro95fFPHX73Dd+YLM7pPfxg+mmIO/JD1sMIkO/FaACmTHI8VE?= =?us-ascii?Q?AlxwA7DMf7WFgQyXdAoqDFJTbaVxD7MGqA9mLKxdXX/X5IsyXC3MFdiNpQ82?= =?us-ascii?Q?3ifU8n6BJMgUmGrSjTE4UMLqmhG0YG8o3GRIAQXxzu+s0mLMPGlpl5Jr/8EC?= =?us-ascii?Q?FVrXgaf5ItfIttQRLi5Bu8=3D?= X-Microsoft-Exchange-Diagnostics: 1;VI1PR02MB0781;5:FbamXgzhE1gnVXXyAcCzfpdePMRXl3Z4VvthwiUEhYJDE9XJYYu3QD5Wt6gXTDcCiwX5EkSxhBcHS6rmz3S/S2BNg1HWJIjvpxx2gXQVdklIhVAwHIJcLU6GsadutwYijA5Yh0XkPEowjmgvY1u+zg==;24:6lBG3kiYCILggl8BiOlIC5PH//qBp28D5g0Rgb00Vgq2UD/kmYVoXUz2lWG104024inBKNz/dMps/Fj/9sUB7W/+9Cz3AKIuGRqugXjll5s=;20:5wA7OaphIB5ONPvWT3mAKXQUACy+EeY5pOn9HQ36k13ccRjA4D7ArHC3VELPdpolBxmjKekzProx9cTRreINCQ== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: ezchip.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Aug 2015 19:56:06.6210 (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: VI1PR02MB0781 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5333 Lines: 119 The cover email for the patch series is getting a little unwieldy so I will provide a terser summary here, and just update the list of changes from version to version. Please see the previous versions linked by the In-Reply-To for more detailed comments about changes in earlier versions of the patch series. v6: restructured to be a "task_isolation" mode not a "cpu_isolated" mode (Frederic) v5: rebased on kernel v4.2-rc3 converted to use CONFIG_CPU_ISOLATED and separate .c and .h files incorporates Christoph Lameter's quiet_vmstat() call v4: rebased on kernel v4.2-rc1 added support for detecting CPU_ISOLATED_STRICT syscalls on arm64 v3: remove dependency on cpu_idle subsystem (Thomas Gleixner) use READ_ONCE instead of ACCESS_ONCE in tick_nohz_cpu_isolated_enter use seconds for console messages instead of jiffies (Thomas Gleixner) updated commit description for patch 5/5 v2: rename "dataplane" to "cpu_isolated" drop ksoftirqd suppression changes (believed no longer needed) merge previous "QUIESCE" functionality into baseline functionality explicitly track syscalls and exceptions for "STRICT" functionality allow configuring a signal to be delivered for STRICT mode failures move debug tracking to irq_enter(), not irq_exit() General summary: The existing nohz_full mode does a nice job of suppressing extraneous kernel interrupts for cores that desire it. However, there is a need for a more deterministic mode that rigorously disallows kernel interrupts, even at a higher cost in user/kernel transition time: for example, high-speed networking applications running userspace drivers that will drop packets if they are ever interrupted. These changes attempt to provide an initial draft of such a framework; the changes do not add any overhead to the usual non-nohz_full mode, and only very small overhead to the typical nohz_full mode. The kernel must be built with CONFIG_TASK_ISOLATION to take advantage of this new mode. A prctl() option (PR_SET_TASK_ISOLATION) is added to control whether processes have requested this stricter semantics, and within that prctl() option we provide a number of different bits for more precise control. Additionally, we add a new command-line boot argument to facilitate debugging where unexpected interrupts are being delivered from. Code that is conceptually similar has been in use in Tilera's Multicore Development Environment since 2008, known as Zero-Overhead Linux, and has seen wide adoption by a range of customers. This patch series represents the first serious attempt to upstream that functionality. Although the current state of the kernel isn't quite ready to run with absolutely no kernel interrupts (for example, workqueues on task_isolation cores still remain to be dealt with), this patch series provides a way to make dynamic tradeoffs between avoiding kernel interrupts on the one hand, and making voluntary calls in and out of the kernel more expensive, for tasks that want it. The series (based currently on v4.2-rc3) is available at: git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile.git dataplane Note: I have not removed the commit to disable the 1Hz timer tick fallback that was nack'ed by PeterZ, pending a decision on that thread as to what to do (https://lkml.org/lkml/2015/5/8/555); also since if we remove the 1Hz tick, task_isolation threads will never re-enter userspace since a tick will always be pending. Chris Metcalf (5): task_isolation: add initial support task_isolation: support PR_TASK_ISOLATION_STRICT mode task_isolation: provide strict mode configurable signal task_isolation: add debug boot flag nohz: task_isolation: allow tick to be fully disabled Christoph Lameter (1): vmstat: provide a function to quiet down the diff processing Documentation/kernel-parameters.txt | 7 +++ arch/arm64/kernel/ptrace.c | 5 ++ arch/tile/kernel/process.c | 9 +++ arch/tile/kernel/ptrace.c | 5 +- arch/tile/mm/homecache.c | 5 +- arch/x86/kernel/ptrace.c | 2 + include/linux/context_tracking.h | 11 +++- include/linux/isolation.h | 42 +++++++++++++ include/linux/sched.h | 3 + include/linux/vmstat.h | 2 + include/uapi/linux/prctl.h | 8 +++ init/Kconfig | 20 ++++++ kernel/Makefile | 1 + kernel/context_tracking.c | 12 +++- kernel/irq_work.c | 5 +- kernel/isolation.c | 122 ++++++++++++++++++++++++++++++++++++ kernel/sched/core.c | 21 +++++++ kernel/signal.c | 5 ++ kernel/smp.c | 4 ++ kernel/softirq.c | 7 +++ kernel/sys.c | 8 +++ kernel/time/tick-sched.c | 3 +- mm/vmstat.c | 14 +++++ 23 files changed, 311 insertions(+), 10 deletions(-) create mode 100644 include/linux/isolation.h create mode 100644 kernel/isolation.c -- 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/