From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752623AbdLMJxc (ORCPT ); Wed, 13 Dec 2017 04:53:32 -0500 Received: from mail-pl0-f66.google.com ([209.85.160.66]:46959 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752403AbdLMJx2 (ORCPT ); Wed, 13 Dec 2017 04:53:28 -0500 X-Google-Smtp-Source: ACJfBotyrxo9rtkyqnUpF82P1zzehB+xIdCJjipGAZTdv63NmjApkI0c2aju4QLoxIfy9l682psCEA== From: Viresh Kumar To: Rafael Wysocki , Ingo Molnar , Peter Zijlstra Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , dietmar.eggemann@arm.com, morten.rasmussen@arm.com, juri.lelli@redhat.com, tkjos@android.com, joelaf@google.com, linux-kernel@vger.kernel.org Subject: [PATCH 0/4] sched: cpufreq: Track util update flags Date: Wed, 13 Dec 2017 15:23:19 +0530 Message-Id: X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Currently the schedutil governor overwrites the sg_cpu->flags field on every call to the utilization handler. It was pretty good as the initial implementation of utilization handlers, there are several drawbacks though. The biggest drawback is that the sg_cpu->flags field doesn't always represent the correct type of tasks that are enqueued on a CPU's rq. For example, if a fair task is enqueued while a RT or DL task is running, we will overwrite the flags with value 0 and that may take the CPU to lower OPPs unintentionally. There can be other corner cases as well which we aren't aware of currently. This patchset tries to solve these problems by taking a different approach than overwriting flags, i.e. set and reset them. The second patch does that transition, other three patches are minor optimizations here and there, but related to this work. Tested these on hikey620 with cyclictest, perf-pipe, hackbench and ebizzy and no obvious regressions were seen. Based over linux-next/master (as I wanted both tip/master and pm/linux-next). -- viresh Viresh Kumar (4): cpufreq: schedutil: Initialize sg_cpu->flags to 0 sched: cpufreq: Keep track of cpufreq utilization update flags cpufreq: schedutil: Don't pass flags to sugov_set_iowait_boost() cpufreq: schedutil: Don't call sugov_get_util() unnecessarily include/linux/sched/cpufreq.h | 7 ++++++- kernel/sched/cpufreq_schedutil.c | 36 +++++++++++++++++++++++++----------- kernel/sched/deadline.c | 4 ++++ kernel/sched/fair.c | 8 ++++++-- kernel/sched/rt.c | 4 ++++ 5 files changed, 45 insertions(+), 14 deletions(-) -- 2.15.0.194.g9af6a3dea062