Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423258AbbEOV21 (ORCPT ); Fri, 15 May 2015 17:28:27 -0400 Received: from mail-am1on0072.outbound.protection.outlook.com ([157.56.112.72]:32541 "EHLO emea01-am1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2992531AbbEOV2H (ORCPT ); Fri, 15 May 2015 17:28:07 -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 , CC: Chris Metcalf Subject: [PATCH v2 5/5] nohz: cpu_isolated: allow tick to be fully disabled Date: Fri, 15 May 2015 17:27:31 -0400 Message-ID: <1431725251-20943-5-git-send-email-cmetcalf@ezchip.com> X-Mailer: git-send-email 2.1.2 In-Reply-To: <1431725251-20943-1-git-send-email-cmetcalf@ezchip.com> References: <1431725178-20876-1-git-send-email-cmetcalf@ezchip.com> <1431725251-20943-1-git-send-email-cmetcalf@ezchip.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;DB3FFO11FD023;1:hs8B1xaaoaE76F4LmrqgPby/F4qGS+80tJyZypshzAkv/use5mS6Py0Ebctt263+ty+kJlm0DfIK0k+rLB6LC2lABnipxlTObdOADvHbZ/S/5Md9P6rKXgO5iP6WNFh7YHc15Sj4H51aiG1vZiyYvrOVntPxxxbG7k2huN/AtBlm703HpRulbMGN0Tj+fvs065ClixN1+NNWsW47G5YENmkcTUd4qT+/Si0rZTgxVRqNg0DOTEc3bFeqQn/JMyBOJ428d7XVQQyOrrOT9oyRwAdcMWPyTL287QfFzheSnTw= X-Forefront-Antispam-Report: CIP:12.216.194.146;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10009020)(979002)(6009001)(339900001)(189002)(199003)(86362001)(106466001)(106476002)(6806004)(81156007)(42186005)(104016003)(33646002)(50466002)(87936001)(46102003)(229853001)(48376002)(107886002)(5001960100002)(189998001)(19580405001)(85426001)(5001770100001)(47776003)(2950100001)(15975445007)(19580395003)(50226001)(36756003)(92566002)(105606002)(77156002)(62966003)(76176999)(50986999)(9376004)(921003)(4001430100001)(1121003)(969003)(989001)(999001)(1009001)(1019001);DIR:OUT;SFP:1101;SCL:1;SRVR:DB4PR02MB0430;H:ld-1.internal.tilera.com;FPR:;SPF:Fail;MLV:ovrnspm;MX:1;A:1;PTR:InfoNoRecords;LANG:en; MIME-Version: 1.0 Content-Type: text/plain X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DB4PR02MB0430; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:DB4PR02MB0430;BCL:0;PCL:0;RULEID:;SRVR:DB4PR02MB0430; X-Forefront-PRVS: 0577AD41D6 X-OriginatorOrg: ezchip.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 May 2015 21:28:02.5112 (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: DB4PR02MB0430 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2220 Lines: 54 While the current fallback to 1-second tick is still helpful for maintaining completely correct kernel semantics, processes using prctl(PR_SET_CPU_ISOLATED) semantics place a higher priority on running completely tickless, so don't bound the time_delta for such processes. This was previously discussed in https://lkml.org/lkml/2014/10/31/364 and Thomas Gleixner observed that vruntime, load balancing data, load accounting, and other things might be impacted. Frederic Weisbecker similarly observed that allowing the tick to be indefinitely deferred just meant that no one would ever fix the underlying bugs. However it's at least true that the mode proposed in this patch can only be enabled on an isolcpus core, which may limit how important it is to maintain scheduler data correctly, for example. It's also worth observing that the tile architecture has been using similar code for its Zero-Overhead Linux for many years (starting in 2005) and customers are very enthusiastic about the resulting bare-metal performance on cores that are available to run full Linux semantics on demand (crash, logging, shutdown, etc). So this semantics is very useful if we can convince ourselves that doing this is safe. Signed-off-by: Chris Metcalf --- Note: I have kept this in the series despite PeterZ's nack, since it didn't seem resolved in the original thread from v1 of the patch (https://lkml.org/lkml/2015/5/8/555). kernel/time/tick-sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index 772be78f926c..be4db5d81ada 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -727,7 +727,7 @@ static ktime_t tick_nohz_stop_sched_tick(struct tick_sched *ts, } #ifdef CONFIG_NO_HZ_FULL - if (!ts->inidle) { + if (!ts->inidle && !tick_nohz_is_cpu_isolated()) { time_delta = min(time_delta, scheduler_tick_max_deferment()); } -- 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/