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: 108066 Delivered-To: patch@linaro.org Received: by 10.182.45.195 with SMTP id p3csp5412697obm; Mon, 17 Jul 2017 21:54:40 -0700 (PDT) X-Received: by 10.98.144.13 with SMTP id a13mr1115305pfe.233.1500353679955; Mon, 17 Jul 2017 21:54:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500353679; cv=none; d=google.com; s=arc-20160816; b=HVi8pCzeLWWMo0rK85cfv1ujrILjMrpDkyXOYHxzuerWe2ggBeGppWFBEAu/KgyC19 S5cgj7drO3wk3Mo1ZLHZOL3GOTYPmTwWJHB73pPdfXbI+CWD2T5iK34WcBdHfwcACzcX zIPgs+IPekO6IMquxbY26f3ANe71AAk74A4kIrFcksXTubOeP8mYVlkFRgnAaoXLhUgl a07NanXAoRl9Qicf0OrM14RdVZVauobzl1qXFMDWU713mUdlHb1tcZrIWynz6nJFEFXf g8ENr5U1StcfZVT5Wlp+Z0mHxaNXP3GVNODWTQIjPI0R3Y8zI0r/FwV6X19bFtcTKcBC EDaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=owsNLMac7bV0EiVtWRMN4SG0TpNMYZR9U6itE2RfRMI=; b=spp+MBpgFBKvU4zYN6PvOPRYCJUSkhnleiu213yl/AC4Tnqz5HJqIN4Eqj4CP3bfDj ijgnudHxB1Q3aEqRN8Wif7d+QVgPoKXUCAfie49fLv+VDrIaq/R64Nypv70fC2CPrr9A bxLU0O1NOUem9pUXalPnzFYvK8aOJyJ89+JxkkNiAyyHGSOLgKzhKPcxf/EAaHgxeCba IaoCBH2F4qaxf+lZLYLImO9g/+0rBK+llRPptO3d5Z3HP5Fmjpst1puVPeXXrbcvytDY nhUJzuHugvBeUXGi2382JMNcTxCBDYrrSMmdd/XmDx98oucswbSRO1DVasmL/fU74J9p eBDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=AwGqe0ov; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 23si907808pga.93.2017.07.17.21.54.39; Mon, 17 Jul 2017 21:54:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.b=AwGqe0ov; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751333AbdGREyi (ORCPT + 13 others); 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 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(-) -- 2.13.0.71.gd7076ec9c9cb 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)