From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12A1DC433E0 for ; Wed, 17 Feb 2021 04:28:06 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8F3D564DF3 for ; Wed, 17 Feb 2021 04:28:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8F3D564DF3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=2b3Ws40TvBOdSUIBjtx42WfEm9NKJj8NsS/0S/iOjEY=; b=BQaJF8MMImjH0khiQk1UEfsGs c+tHVbwx3/zrRCfPHmW47H49kOpty+jnUdh74d8xiaVaLP/E1J9OLlov2lq4AkVoP/SP8Sh/7DrCj cvvZ/aIDCI5kB3gjEd3hcup8tsrl5WGwghu10W7VzkMBs7gtupd7Zk1IcHm50vahr07qNrco8LjaZ VnVuzo99HnDOP4Nt3qo5t2hrdFLw+fZHGcajzrGZIgDxaYQdT6UllW8HhkxlCwrJmAQJ3jwhDItkw Sypn7x1U1un72JNF65d8bsIayPuBTGoiYue4AQvl4BiakfRdGwTTl4ZU39NRt6ojrivvIvnf4Z2iy zP4UC9i4g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lCEPh-0005D4-Ho; Wed, 17 Feb 2021 04:26:09 +0000 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lCEPd-0005Bk-Q9 for linux-arm-kernel@lists.infradead.org; Wed, 17 Feb 2021 04:26:07 +0000 Received: by mail-pj1-x1032.google.com with SMTP id lw17so879949pjb.0 for ; Tue, 16 Feb 2021 20:26:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=YzQ3Ntnx2eFZZBEtRSvFqcJub5kYZcaEUuwH2LgukfU=; b=GF54HJeqkRyhzQ+s1UuFr+w4WNWreO8HkCTv0fjuc8ieF4Vuv1uG68W2aMLLLYVkDL 27rv7civIAcFkIQZkHqqknj/dKZ2FNRM+hR+6dtEhwLXINCkAG/6BYMDcfvzQSHGYgy6 nxm4+W7b9nypIGbXtoM0RMQUAAyiUNJNyFlzAXX31eP6kPVkLReHqNsR22vw7f7wr/ti 9U/Mbq+z/QrGmUUEKZrsjFVM4G4OJv04m9BGogx3DGwPTtrw3C3orl5A0nNx+5jAEdE7 +MQHhq3fIwc6Ydgyr7ygK0QVnCVkVQU6Rjmpi1ObI1WizR4NuDQ2FmWaDhg2lxXpr+0V 87ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=YzQ3Ntnx2eFZZBEtRSvFqcJub5kYZcaEUuwH2LgukfU=; b=o2/ce0u4WBoxKn3un1+nEN2AMzNbFnORPZ6ryMlYGA8hHPm65fWtvtqB7eG7U88lgU V1CQvt1dZZ2pWMdnF0oBLxdGgQgtSfEuSbZZkG4w+OQnzZudZvxRWhZVTGCK+JUlGcHb f+vzqMhUHc/IX3lH4eNFE4nlsLNKRGJ2Lgn47qLE5/WSL1LiCCmp7sxE2dofC7aBTQco mRRSnUCWGNLDVB6JpyT+BC2mkeWcL1upKKFhflvbSkdmpyWMma3S2yjo+VTxEsay5rzk dQG/xFP7P27FfiXgILmkjVDhFJjx+6r36NR1bG6mWuKH0B77rs/S8rYD3wVhUrdk1UBH kYtw== X-Gm-Message-State: AOAM533TA5iOAEOe8g5bk4Nvr4FEma8iuBWVV4BAdeLlmd8mS91DNf9p YYLJCK5eGWBTwCkW8plXt5N1Tg== X-Google-Smtp-Source: ABdhPJwD1MjawYnKf/zWxkffns2EzkYqkyajXQZau0EaYhD/LPRTlppqqZbAVVP4NmCKvXiEjHG10A== X-Received: by 2002:a17:90b:3781:: with SMTP id mz1mr7396744pjb.178.1613535962017; Tue, 16 Feb 2021 20:26:02 -0800 (PST) Received: from localhost ([122.172.59.240]) by smtp.gmail.com with ESMTPSA id t17sm695687pgk.25.2021.02.16.20.26.00 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Feb 2021 20:26:01 -0800 (PST) Date: Wed, 17 Feb 2021 09:55:58 +0530 From: Viresh Kumar To: Ionela Voinescu Subject: Re: [PATCH V3 1/2] topology: Allow multiple entities to provide sched_freq_tick() callback Message-ID: <20210217042558.o4anjdkayzgqny55@vireshk-i7> References: <20210203114521.GA6380@arm.com> <20210205091424.3od3tme3f7mh7ebp@vireshk-i7> <20210217002422.GA17422@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210217002422.GA17422@arm.com> User-Agent: NeoMutt/20180716-391-311a52 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210216_232606_136893_53FF6F59 X-CRM114-Status: GOOD ( 19.04 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vincent Guittot , linux-pm@vger.kernel.org, Catalin Marinas , Rafael Wysocki , linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Sudeep Holla , Will Deacon , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 17-02-21, 00:24, Ionela Voinescu wrote: > I think it could be merged in patch 1/2 as it's part of enabling the use > of multiple sources of information for FIE. Up to you! Sure. > > static void amu_fie_setup(const struct cpumask *cpus) > > { > > - bool invariant; > > int cpu; > > > > /* We are already set since the last insmod of cpufreq driver */ > > @@ -257,25 +256,10 @@ static void amu_fie_setup(const struct cpumask *cpus) > > > > cpumask_or(amu_fie_cpus, amu_fie_cpus, cpus); > > > > - invariant = topology_scale_freq_invariant(); > > - > > - /* We aren't fully invariant yet */ > > - if (!invariant && !cpumask_equal(amu_fie_cpus, cpu_present_mask)) > > - return; > > - > > You still need these checks, otherwise you could end up with only part > of the CPUs setting a scale factor, when only part of the CPUs support > AMUs and there is no cpufreq support for FIE. Both supports_scale_freq_counters() and topology_scale_freq_invariant() take care of this now and they will keep reporting the system as invariant until the time all the CPUs have counters (in absence of cpufreq). The topology_set_scale_freq_source() API is supposed to be called multiple times, probably once for each policy and so I don't see a need of these checks anymore. > Small(ish) optimisation at the beginning of this function: > > if (cpumask_empty(&scale_freq_counters_mask)) > scale_freq_invariant = topology_scale_freq_invariant(); > > This will save you a call to rebuild_sched_domains_energy(), which is > quite expensive, when cpufreq supports FIE and we also have counters. Good Point. > After comments addressed, > > Reviewed-by: Ionela Voinescu Thanks. > Tested-by: Ionela Voinescu Just out of curiosity, what exactly did you test and what was the setup ? :) -- viresh _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel