Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753447AbdGJHqu (ORCPT ); Mon, 10 Jul 2017 03:46:50 -0400 Received: from mail-oi0-f47.google.com ([209.85.218.47]:34007 "EHLO mail-oi0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752225AbdGJHqt (ORCPT ); Mon, 10 Jul 2017 03:46:49 -0400 MIME-Version: 1.0 In-Reply-To: <20170707105932.bnslgcqjp4rwg273@e106622-lin> References: <20170705085905.6558-1-juri.lelli@arm.com> <20170705085905.6558-5-juri.lelli@arm.com> <20170707085848.GA32542@vireshk-i7> <20170707105932.bnslgcqjp4rwg273@e106622-lin> From: Joel Fernandes Date: Mon, 10 Jul 2017 00:46:42 -0700 Message-ID: Subject: Re: [RFC PATCH v1 4/8] sched/cpufreq_schedutil: split utilization signals To: Juri Lelli Cc: Viresh Kumar , Peter Zijlstra , Ingo Molnar , "Rafael J. Wysocki" , LKML , Linux PM , Thomas Gleixner , Vincent Guittot , Steven Rostedt , Luca Abeni , claudio@evidence.eu.com, Tommaso Cucinotta , bristot@redhat.com, Mathieu Poirier , Todd Kjos , Andres Oportus , Morten Rasmussen , Dietmar Eggemann , Patrick Bellasi , Ingo Molnar , "Rafael J . Wysocki" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1157 Lines: 34 On Fri, Jul 7, 2017 at 3:59 AM, Juri Lelli wrote: [..] > >> If yes, then I don't think it was about having separate APIs, but just storing >> util_cfs/dl separately. >> >> > -static void sugov_get_util(unsigned long *util, unsigned long *max) >> > +static void sugov_get_util(struct sugov_cpu *sg_cpu) >> > { >> > struct rq *rq = this_rq(); >> > - unsigned long dl_util = (rq->dl.running_bw * SCHED_CAPACITY_SCALE) >> > - >> BW_SHIFT; >> > >> > - *max = arch_scale_cpu_capacity(NULL, smp_processor_id()); >> > + sg_cpu->max = arch_scale_cpu_capacity(NULL, smp_processor_id()); >> > + sg_cpu->util_cfs = rq->cfs.avg.util_avg; >> > + sg_cpu->util_dl = (rq->dl.running_bw * SCHED_CAPACITY_SCALE) >> > + >> BW_SHIFT; >> > +} >> > >> > +static unsigned long sugov_aggregate_util(struct sugov_cpu *sg_cpu) >> >> As Joel already mentioned, I don't think we should create two separate routines >> here. >> > > Mmm, it makes retrieving of utilization in sugov_update_shared and > aggregating values for the domain in sugov_next_freq_shared cleaner, > IMHO. > I agree, thanks. -Joel