From patchwork Mon Sep 16 22:43:48 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 2899841 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BD0069F1E3 for ; Mon, 16 Sep 2013 22:44:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F200A2017C for ; Mon, 16 Sep 2013 22:44:24 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 132FE20177 for ; Mon, 16 Sep 2013 22:44:24 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VLhWl-0001nS-LX; Mon, 16 Sep 2013 22:44:19 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VLhWj-0002Ph-GZ; Mon, 16 Sep 2013 22:44:17 +0000 Received: from mail-pb0-f53.google.com ([209.85.160.53]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VLhWh-0002OA-3n for linux-arm-kernel@lists.infradead.org; Mon, 16 Sep 2013 22:44:15 +0000 Received: by mail-pb0-f53.google.com with SMTP id up15so4640747pbc.26 for ; Mon, 16 Sep 2013 15:43:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=I03mtKObVf+vHurbFd3eXTVg63UZEBmpeSD1PN1KyeM=; b=XPNDxjCX6x3eVd3yUS/EJBU6AncxxQQDiwTMNlSk6jIG2D8hgy3s2SGG3mQgExgYIM c9nnHrcwkF+iMxBoduodlv5ZPpvcxj5LIUWZeGlj0Lnqt6CpWUK1seGVR8OhbiY/vWFV fR3LzM5e1MxZsJWJzed/YYCwaO7cApQ0goeNelj1v/jgabUXRieQ4YH7E7pO3zSO8DDW 30kcssar+zk9g7dBZj6dNV4VLaeObFu7sNRfJQeDXbebpKhUuz+mESAdy5qo/HSBrddK xj0bQ6pep/zbgtILE6CzSXAS1Rbvi4R4ZeuCaverEiCBdoZ1afHuFkXI15Ai/MWMB08i 5igA== X-Gm-Message-State: ALoCoQm4Ec0F/GDUb4f0AcD1zedVg0mDUmpp6R/h//MZkTVhgG7Gg/XuR9gi1Sv2x4fl+V3Ig2ye X-Received: by 10.68.189.70 with SMTP id gg6mr10023351pbc.123.1379371431940; Mon, 16 Sep 2013 15:43:51 -0700 (PDT) Received: from localhost (c-24-19-7-36.hsd1.wa.comcast.net. [24.19.7.36]) by mx.google.com with ESMTPSA id xv2sm27594448pbb.39.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 16 Sep 2013 15:43:51 -0700 (PDT) From: Kevin Hilman To: Frederic Weisbecker Subject: [PATCH 1/2] sched/nohz: add debugfs control over sched_tick_max_deferment Date: Mon, 16 Sep 2013 15:43:48 -0700 Message-Id: <1379371429-22214-1-git-send-email-khilman@linaro.org> X-Mailer: git-send-email 1.8.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130916_184415_227574_D1437C1A X-CRM114-Status: GOOD ( 10.52 ) X-Spam-Score: -2.6 (--) Cc: Paul McKenney , linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Allow debugfs override of sched_tick_max_deferment in order to ease finding/fixing the remaining issues with full nohz. The value to be written is in jiffies, and -1 means the max deferment is disabled (scheduler_tick_max_deferment() returns KTIME_MAX.) Cc: Frederic Weisbecker Signed-off-by: Kevin Hilman --- kernel/sched/core.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 5ac63c9..4b1fe3e 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -2175,6 +2175,8 @@ void scheduler_tick(void) } #ifdef CONFIG_NO_HZ_FULL +static u32 sched_tick_max_deferment = HZ; + /** * scheduler_tick_max_deferment * @@ -2193,13 +2195,25 @@ u64 scheduler_tick_max_deferment(void) struct rq *rq = this_rq(); unsigned long next, now = ACCESS_ONCE(jiffies); - next = rq->last_sched_tick + HZ; + if (sched_tick_max_deferment == -1) + return KTIME_MAX; + + next = rq->last_sched_tick + sched_tick_max_deferment; if (time_before_eq(next, now)) return 0; return jiffies_to_usecs(next - now) * NSEC_PER_USEC; } + +static __init int sched_nohz_full_init_debug(void) +{ + debugfs_create_u32("sched_tick_max_deferment", 0644, NULL, + &sched_tick_max_deferment); + + return 0; +} +late_initcall(sched_nohz_full_init_debug); #endif notrace unsigned long get_parent_ip(unsigned long addr)