From patchwork Fri Sep 26 19:45:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 38023 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 15D2620F2E for ; Fri, 26 Sep 2014 19:45:41 +0000 (UTC) Received: by mail-la0-f72.google.com with SMTP id mc6sf3157868lab.7 for ; Fri, 26 Sep 2014 12:45:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=HA11YXAq7dK7WAcvVq8QIVgHGqoxFVBHsCqQaoG35r4=; b=UktxNv9HIg1mwoRpU3Ud28NAY69EfKFf8qhIwVG5Zi8S0qrR+GH9SE6xUb8XJcP1Jl 7DX9WIMns1sz84IBoR03yc9O+nrcokhOgFG4CnlfmTjKXqlCaDLzBX2CvBfzMEBrKgX8 q6+BmN4EeTSvPVtXAPGLAxqcayhlLvnqZyMWwi1kINQqVSBLzYhgBrL1uSH2OePiXEQd +2LAo0abVIttjdoGsPw6Saw/GGydOrE6ZgAqHrju0nEfXPzht+4a7BNWb9Xiao+N1BU2 ywtPBy+c6Rw0wM0J+EPKyQW5Ceoraa1kBEuTossn08+Mk7FyQIdTN48zWrurftQFCP2h d02A== X-Gm-Message-State: ALoCoQlCTVEtQvj1n1KIK2I32AcIUusDsifh/DbJjH11lQTkRBtLsmQV6Ml50QNAuIYs/FDEnCo+ X-Received: by 10.112.137.230 with SMTP id ql6mr737140lbb.13.1411760740816; Fri, 26 Sep 2014 12:45:40 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.3.132 with SMTP id c4ls395204lac.88.gmail; Fri, 26 Sep 2014 12:45:40 -0700 (PDT) X-Received: by 10.152.21.42 with SMTP id s10mr22795859lae.61.1411760740648; Fri, 26 Sep 2014 12:45:40 -0700 (PDT) Received: from mail-la0-f46.google.com (mail-la0-f46.google.com [209.85.215.46]) by mx.google.com with ESMTPS id dy7si8604079lac.28.2014.09.26.12.45.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 26 Sep 2014 12:45:40 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) client-ip=209.85.215.46; Received: by mail-la0-f46.google.com with SMTP id gi9so4872086lab.33 for ; Fri, 26 Sep 2014 12:45:40 -0700 (PDT) X-Received: by 10.112.130.226 with SMTP id oh2mr5026205lbb.100.1411760740317; Fri, 26 Sep 2014 12:45:40 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.130.169 with SMTP id of9csp121428lbb; Fri, 26 Sep 2014 12:45:39 -0700 (PDT) X-Received: by 10.68.203.5 with SMTP id km5mr34427259pbc.91.1411760738917; Fri, 26 Sep 2014 12:45:38 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gk5si10753407pbc.246.2014.09.26.12.45.38 for ; Fri, 26 Sep 2014 12:45:38 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755782AbaIZTpf (ORCPT + 27 others); Fri, 26 Sep 2014 15:45:35 -0400 Received: from mail.kernel.org ([198.145.19.201]:51378 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754884AbaIZTpe (ORCPT ); Fri, 26 Sep 2014 15:45:34 -0400 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BA088201C0; Fri, 26 Sep 2014 19:45:33 +0000 (UTC) Received: from localhost (c-67-183-17-239.hsd1.wa.comcast.net [67.183.17.239]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1D72C201B9; Fri, 26 Sep 2014 19:45:33 +0000 (UTC) From: Kevin Hilman To: Frederic Weisbecker Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linaro-kernel@lists.linaro.org, Kevin Hilman Subject: [PATCH] sched/nohz: add debugfs control over sched_tick_max_deferment Date: Fri, 26 Sep 2014 12:45:32 -0700 Message-Id: <1411760732-14102-1-git-send-email-khilman@kernel.org> X-Mailer: git-send-email 2.1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=ham 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linux-kernel-owner@vger.kernel.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Kevin Hilman 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 bc1638b33449..dee044a5d447 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -2514,6 +2514,8 @@ void scheduler_tick(void) } #ifdef CONFIG_NO_HZ_FULL +static u32 sched_tick_max_deferment = HZ; + /** * scheduler_tick_max_deferment * @@ -2532,13 +2534,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_nsecs(next - now); } + +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)