Received: by 10.223.164.202 with SMTP id h10csp548139wrb; Thu, 30 Nov 2017 03:49:29 -0800 (PST) X-Google-Smtp-Source: AGs4zMYoqC8hZul9/veaVSWD6WDHy7m2TTVtpqE0MixuR39EC4m9ZeaC+HU3Qf7+i8jxAed7D3nW X-Received: by 10.84.240.70 with SMTP id h6mr2399932plt.349.1512042569560; Thu, 30 Nov 2017 03:49:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512042569; cv=none; d=google.com; s=arc-20160816; b=wco3ZbLxsMMyFBhglBLHRJdUubsau4kGsVmh1RmzXJoRX3ma4lTSS44pSLxugUoO9l ScI4T8Jk8PGwrROft9+xRy/ghbGYYgS5Atv7jYA4BcBO3YO3zQM2FV8RIY7C1pqe1CfR YM3AUv95BYxB6p3oi1YwLXltn4o0QyJpyi5yqx0R0GF5pG1+QbZg4sUNd04aatKbzxuv h31l/RJtDJ4xyEC9epwBYZ7n9CHEGURpDrSuk7HnXxau2KWb7CYuuHnCXpcPsYesj/nR 7Jbv5KKUuNE7u22J1nPTNyUj0cFVIOXx5SoHdVi4fxv5a37ueAvF1TBuBBs8R58+ptqM cxkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=byrhcP4bLcxcFVGa5jRArDC5Hi0yLcrdvJf1Ge7lHNc=; b=oP+sHAxS4OMaPUj4P7jbBurHSapLQRcaol088LIMelM4JvVxXM/O7SqFiKOOkpJYhj 38nJzaowClzJ5MR6If+i5uhS1oiO6G34Zmch7Swb2bfVgPGzYCc+pllUcb4fUu1mMg/T YdkQ2kFC/b2Vzb0HGB/HllLePBtpFB7SLqTP3Qm643ReFsE9sFfvZm380iJhdBcCk9kQ wLgctIwWitsjxmmI9aPZLe5bwD/ccI/8d5qW/6TXRKck4/f5xvawi4Kf26iCnDyLY9/2 JR9LVVljK7X9TES9SiwCVY5ReFxDewADHRt/PP7iJm4clCdGsX3bzg43SjnAXzrdc2bu BbtQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m25si2932525pge.76.2017.11.30.03.49.15; Thu, 30 Nov 2017 03:49:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752591AbdK3Lr7 (ORCPT + 99 others); Thu, 30 Nov 2017 06:47:59 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:51280 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752550AbdK3Lr4 (ORCPT ); Thu, 30 Nov 2017 06:47:56 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9753A15BE; Thu, 30 Nov 2017 03:47:56 -0800 (PST) Received: from e110439-lin.cambridge.arm.com (e110439-lin.cambridge.arm.com [10.1.210.68]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 60E923F236; Thu, 30 Nov 2017 03:47:54 -0800 (PST) From: Patrick Bellasi To: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Cc: Ingo Molnar , Peter Zijlstra , "Rafael J . Wysocki" , Viresh Kumar , Vincent Guittot , Dietmar Eggemann , Morten Rasmussen , Juri Lelli , Todd Kjos , Joel Fernandes Subject: [PATCH v3 3/6] cpufreq: schedutil: update CFS util only if used Date: Thu, 30 Nov 2017 11:47:20 +0000 Message-Id: <20171130114723.29210-4-patrick.bellasi@arm.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171130114723.29210-1-patrick.bellasi@arm.com> References: <20171130114723.29210-1-patrick.bellasi@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently the utilization of the FAIR class is collected before locking the policy. Although that should not be a big issue for most cases, we also don't really know how much latency there can be between the utilization reading and its usage. Let's get the FAIR utilization right before its usage to be better in sync with the current status of a CPU. Signed-off-by: Patrick Bellasi Reviewed-by: Dietmar Eggemann Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Viresh Kumar Cc: linux-kernel@vger.kernel.org Cc: linux-pm@vger.kernel.org --- Changes from v2: - rebased on v4.15-rc1 Change-Id: I9291a560bcad7db76894e3f0fcdb917511d0479e --- kernel/sched/cpufreq_schedutil.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c index 448f49de5335..40521d59630b 100644 --- a/kernel/sched/cpufreq_schedutil.c +++ b/kernel/sched/cpufreq_schedutil.c @@ -351,10 +351,9 @@ static void sugov_update_shared(struct update_util_data *hook, u64 time, unsigned int next_f; bool rt_mode; - sugov_get_util(&util, &max, sg_cpu->cpu); - raw_spin_lock(&sg_policy->update_lock); + sugov_get_util(&util, &max, sg_cpu->cpu); sg_cpu->util = util; sg_cpu->max = max; -- 2.14.1 From 1584099902383533857@xxx Wed Nov 15 03:09:51 +0000 2017 X-GM-THRID: 1584099902383533857 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread