From patchwork Tue Jul 18 04:54:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 9846843 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E03F4602A7 for ; Tue, 18 Jul 2017 04:54:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DBE0626785 for ; Tue, 18 Jul 2017 04:54:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D0E9B26BE9; Tue, 18 Jul 2017 04:54:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_HI,RCVD_IN_SORBS_SPAM autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9DBE926785 for ; Tue, 18 Jul 2017 04:54:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751333AbdGREyi (ORCPT ); Tue, 18 Jul 2017 00:54:38 -0400 Received: from mail-pg0-f44.google.com ([74.125.83.44]:36628 "EHLO mail-pg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751072AbdGREyh (ORCPT ); Tue, 18 Jul 2017 00:54:37 -0400 Received: by mail-pg0-f44.google.com with SMTP id u5so5799910pgq.3 for ; Mon, 17 Jul 2017 21:54:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=owsNLMac7bV0EiVtWRMN4SG0TpNMYZR9U6itE2RfRMI=; b=AwGqe0ovvD/c82z3p4KV/ip0Yf9EKza2R5nvQmNW+8VCQRgvAQpHJzjhOeSvgZeVwI +dFbIh8ldpvpLBZw1/9aE2oTNDY0hTh98i8mACrW33BjwKmZaXfo/Be4IWO9QecBdi/q d8x8ZmlU84I3mcMOV32gzj2xA/alkEkfVwE84= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=owsNLMac7bV0EiVtWRMN4SG0TpNMYZR9U6itE2RfRMI=; b=VkLpV533ETMfR7/G6oH5/s06kZWNJKGjghzvZPcdbg6tH3Id/cPLtdVUOXuLmPu/kH cA4aJ5iEylehqGmFBTYPW3/9ELHOJ3u/M/xc4afT5O7uVvtFHF6dJpXTMS6Qp5Km/h88 hz4yV3VZ3Q4nOvpR2/QFGn5/SuOs5iqDXL20SPycAiBvszKKnBm2c70vsGIcW4VpSuzg 32grwEzJXG9+PFw9LFuNiPMAqdGCvIZ8PeAKa1oW7ElvtZilYJ4g4MTIzu19qERiLu3v Z7txmv187AcNnglU5J3ocmi29c66w4pb0v45peqYb4D8vlwo8plB94CH9OBGyCW6cZnG nfBQ== X-Gm-Message-State: AIVw111X5o9mJfLP4XtblvejNUwta9pLJFCDtAnAHC512rXSFQ2kOH2x R214RTzYmm3i9r3A X-Received: by 10.99.184.2 with SMTP id p2mr1119317pge.194.1500353677232; Mon, 17 Jul 2017 21:54:37 -0700 (PDT) Received: from localhost ([122.172.70.30]) by smtp.gmail.com with ESMTPSA id i19sm1675034pfj.78.2017.07.17.21.54.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Jul 2017 21:54:36 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki , Ingo Molnar , Peter Zijlstra Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , joelaf@google.com, Juri Lelli , linux-kernel@vger.kernel.org Subject: [PATCH] cpufreq: schedutil: Update last_update from sugov_set_iowait_boost() Date: Tue, 18 Jul 2017 10:24:32 +0530 Message-Id: <4927469221fa6b2ea7efffb2da923dac930ab313.1500353473.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.13.0.71.gd7076ec9c9cb Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP sg_cpu->last_update is always updated right after we call sugov_set_iowait_boost() and its better to update it from that routine itself. This makes it more readable. Signed-off-by: Viresh Kumar --- kernel/sched/cpufreq_schedutil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c index 29a397067ffa..63557b9f36b6 100644 --- a/kernel/sched/cpufreq_schedutil.c +++ b/kernel/sched/cpufreq_schedutil.c @@ -177,6 +177,8 @@ static void sugov_set_iowait_boost(struct sugov_cpu *sg_cpu, u64 time, if (delta_ns > TICK_NSEC) sg_cpu->iowait_boost = 0; } + + sg_cpu->last_update = time; } static void sugov_iowait_boost(struct sugov_cpu *sg_cpu, unsigned long *util, @@ -219,7 +221,6 @@ static void sugov_update_single(struct update_util_data *hook, u64 time, bool busy; sugov_set_iowait_boost(sg_cpu, time, flags); - sg_cpu->last_update = time; if (!sugov_should_update_freq(sg_policy, time)) return; @@ -299,7 +300,6 @@ static void sugov_update_shared(struct update_util_data *hook, u64 time, sg_cpu->flags = flags; sugov_set_iowait_boost(sg_cpu, time, flags); - sg_cpu->last_update = time; if (sugov_should_update_freq(sg_policy, time)) { if (flags & SCHED_CPUFREQ_RT_DL)