Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3651598imm; Thu, 17 May 2018 12:14:34 -0700 (PDT) X-Google-Smtp-Source: AB8JxZojbE77xM6DLIlQD9hyYakDg4W5bq/4MVW9QWiQrutb8qhcqvMKo1jqINxeSShQ2Za3aHCn X-Received: by 2002:a17:902:bd46:: with SMTP id b6-v6mr6362978plx.170.1526584474603; Thu, 17 May 2018 12:14:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526584474; cv=none; d=google.com; s=arc-20160816; b=bqZrLrL+dY22gBwsqETHWcpG9A0I6xXKoa1mJt1dtGotgS7bhW+Wp0KtjtQpKa6m+0 9A9qvXCy3znAoD2fvC7W4vTjP6hAHANzKXCHelY6E1NpQIwQKY2tgKIU6O5VRKGslcxh oQoNYY5mJutsFFZur4n+j+ljNZQWaP3uQlmvBRAHvySat8Jl+b3hMlyEoWavhqKIYuqr s++4zuQL5VuYDq2yA+COQXOKwJ2SRNLMLMIIKIeHiC2CQ4vfGbhrUemkxyhQe0OvAVc+ nMdARiUxSbzGaJ27UAqOpRw2f8AFmAJmhUYC6H1rRIvAU9lKwlkr+HGcIGUXf9KeU6cM vMGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=EZUQR2/7wa8idaLpDbGeD6YsvwqrzVitvLQAEGB4EFM=; b=Yioqsuy/N7Vfl3bBqEQKijg3Fr/QixDxnr8Lv4XV0vTeOUaztjIveFgddIjrO+23Vd kp1cgOcUJvunqPrFNtlNDMzbxamBmPZuMqDIszCuPDdn6Kvky586DLPR/Sad0ig36ecY hxEvvWEkkfClw+j6B/HT4k/e9m1SZIvJ4z3RpYKeDtuybSnHOjctFDFAohRC5IugolET 6rggPYC9lf3yRvbFT7NK7ER0mK4+PkdLK3Y0wJh+9RWmHbJkjoz6BOn5LUbhP5fmVoVU 6Nc54jfBSapP1gJUquQ3Rsk2ft95vCL8if0FAwTc6vFqmfajSVPWFIBxlIHuB7EEhs5T wNpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=bREGbAni; 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 f39-v6si5781765plb.572.2018.05.17.12.14.11; Thu, 17 May 2018 12:14:34 -0700 (PDT) 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; dkim=pass header.i=@joelfernandes.org header.s=google header.b=bREGbAni; 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 S1752100AbeEQTNx (ORCPT + 99 others); Thu, 17 May 2018 15:13:53 -0400 Received: from mail-pl0-f68.google.com ([209.85.160.68]:38684 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751644AbeEQTNv (ORCPT ); Thu, 17 May 2018 15:13:51 -0400 Received: by mail-pl0-f68.google.com with SMTP id c11-v6so3105409plr.5 for ; Thu, 17 May 2018 12:13:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=EZUQR2/7wa8idaLpDbGeD6YsvwqrzVitvLQAEGB4EFM=; b=bREGbAniDNwygrw4eIMIgUCWYeRWvQalxqDZ0yg5tbRIvqRAzFhg4rUowqHfA0Ldoa hzZ3rWkyEVF7foMbnBG1ewLoCVoBz8Kz7AsUP3MGPJ5qwX1GHOQz5o+gSHr8nI2b14OD //gAA4D4sh8mU0VJ/OU6Rd/xSxECrUseMKb+s= 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=EZUQR2/7wa8idaLpDbGeD6YsvwqrzVitvLQAEGB4EFM=; b=BNQ+TjXAZI0Gdk/FBj+pLPlYhZtUpIOPb07TPXDW/ckuPJNdNb59dTwEQs8H26u4Rm qWBC/6ZgWZPd1sLel2RoQyQvx5P/1SqXd2NTs/KWtCMWjKHFt4Sa+0H1xJ8F5edejwUe tlkf9o7lBHz/336azmFMli3/3Smms6MhWYGiyxKhtCySwhdoUl7H2XC1taPUaiovYm5M 34T7aiUmXczTShURLYxY6Abfn3N2ZmFJDHngPD5sTLI4Jg+UyCfRebUxVULl6Bg5zsoC uSVKiGcFb9GSlH6vTUXlv0ggz8oh7ciQ3kWU8VJnSQ4sPsbdDmFfe0yDsoRSAYlQWh90 Mz+A== X-Gm-Message-State: ALKqPwdRDHTYm2KrQEYHDDy2PbzIDxro9zgM4lOrMqcBvb5T3s+/H5sP /yYlZptjVY+9dO8E0SniOqAIzzScfBY= X-Received: by 2002:a17:902:5304:: with SMTP id b4-v6mr6149447pli.231.1526584431076; Thu, 17 May 2018 12:13:51 -0700 (PDT) Received: from localhost ([2620:0:1000:1600:3122:ea9c:d178:eb]) by smtp.gmail.com with ESMTPSA id u9-v6sm11361207pfj.10.2018.05.17.12.13.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 17 May 2018 12:13:50 -0700 (PDT) Date: Thu, 17 May 2018 12:13:50 -0700 From: Joel Fernandes To: Saravana Kannan Cc: Quentin Perret , Dietmar Eggemann , Viresh Kumar , linux-kernel@vger.kernel.org, Peter Zijlstra , Ingo Molnar , linux-pm@vger.kernel.org, Pavan Kondeti , "Rafael J . Wysocki" , Juri Lelli , Joel Fernandes , Patrick Bellasi Subject: Re: [PATCH] Revert "cpufreq: schedutil: Don't restrict kthread to related_cpus unnecessarily" Message-ID: <20180517191350.GB5281@joelaf.mtv.corp.google.com> References: <20180508073340.13114-1-dietmar.eggemann@arm.com> <20180508082242.bre6sjfvefhz6xc3@vireshk-i7> <8cf21b1a-ca6e-fed7-43c5-94c66ff5986b@arm.com> <20180508094237.GA3752@e108498-lin.cambridge.arm.com> <20180513051933.GA64158@joelaf.mtv.corp.google.com> <5AFDD39E.6040203@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5AFDD39E.6040203@codeaurora.org> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 17, 2018 at 12:10:22PM -0700, Saravana Kannan wrote: > On 05/12/2018 10:19 PM, Joel Fernandes wrote: > > On Tue, May 08, 2018 at 10:42:37AM +0100, Quentin Perret wrote: > > > On Tuesday 08 May 2018 at 11:09:57 (+0200), Dietmar Eggemann wrote: > > > > On 05/08/2018 10:22 AM, Viresh Kumar wrote: > > > > > On 08-05-18, 08:33, Dietmar Eggemann wrote: > > > > > > This reverts commit e2cabe48c20efb174ce0c01190f8b9c5f3ea1d13. > > > > > > > > > > > > Lifting the restriction that the sugov kthread is bound to the > > > > > > policy->related_cpus for a system with a slow switching cpufreq driver, > > > > > > which is able to perform DVFS from any cpu (e.g. cpufreq-dt), is not > > > > > > only not beneficial it also harms Enery-Aware Scheduling (EAS) on > > > > > > systems with asymmetric cpu capacities (e.g. Arm big.LITTLE). > > > > > > > > > > > > The sugov kthread which does the update for the little cpus could > > > > > > potentially run on a big cpu. It could prevent that the big cluster goes > > > > > > into deeper idle states although all the tasks are running on the little > > > > > > cluster. > > > > > > > > > > I think the original patch did the right thing, but that doesn't suit > > > > > everybody as you explained. > > > > > > > > > > I wouldn't really revert the patch but fix my platform's cpufreq > > > > > driver to set dvfs_possible_from_any_cpu = false, so that other > > > > > platforms can still benefit from the original commit. > > > > > > > > This would make sure that the kthreads are bound to the correct set of cpus > > > > for platforms with those cpufreq drivers (cpufreq-dt (h960), scmi-cpufreq, > > > > scpi-cpufreq) but it will also change the logic (e.g. > > > > sugov_should_update_freq() -> cpufreq_can_do_remote_dvfs()). > > > > > > > > I'm still struggling to understand when a driver/platform should set > > > > dvfs_possible_from_any_cpu to true and what the actual benefit would be. > > > > > > I assume it might be beneficial to have the kthread moving around freely > > > in some cases, but since it is a SCHED_DEADLINE task now it can't really > > > migrate anywhere anyway. So I'm not sure either if this commits still makes > > > sense now. Or is there another use case for this ? > > > > The usecase I guess is, as Dietmar was saying, that it makes sense for > > kthread to update its own cluster and not disturb other clusters or random > > CPUs. I agree with this point. > > I agree with Viresh. Also, why exactly did we make it deadline instead of > RT? Was RT not getting scheduled quick enough? Is it because Android creates > a lot of RT threads? Because deadline also needs to change frequency and depends on it ;) - Joel