Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp774628ybt; Wed, 24 Jun 2020 10:53:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKlhxEm4p2luxqeTIj+OuR1UvLfmI/0BdkItX5s646kiBHaZIGJezsm1IgcmD0BLw+zVQe X-Received: by 2002:a17:906:51d1:: with SMTP id v17mr25416599ejk.383.1593021232257; Wed, 24 Jun 2020 10:53:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593021232; cv=none; d=google.com; s=arc-20160816; b=Gs0oNxwO+Pp1ax2cBPP8ofxXfyCucJBP9qV4Gt6SMCi4/DBqiE+ryl0C+cv/eL2hQX Ipb4f52R0qervT+b8+nDrZl4gwYDEM/MoI6Hs0XYzEtC77wAHNiHunWT3/yboqNEHIer NdWVVsiIePKCLEXY3maHeKlwPTTgGwPDlEEkLP3RXQxAvkBgMR1P6mMOwt6Ew0PPD9pt aGU2rbHHOhVuUyWCP3xs74NQ4/vezvrFSWji+mLfxsLcYMa1oO5BsbHBjOw6jlsVbH9D J/vr1mvu4Yyy3z6XY+cxC6ZR9CZAWwbunOZkrdnx6DsPE9cXMONXZeL8FTEcYaaN1AKG T41Q== 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; bh=vw0V+B0zJ6dZ47yMBFZJwFYYR9aAr7Guzl5xD7lDpAo=; b=z9NY9EgtPruH0GM70SKqKS4nebhI5MNTNEzEe4ODdy6sBNEz3l24/McXvtdca4cWPv htaTaS8UpgthRhHfY3arcwEonak+3Nz2kl4kQdhCBJgKU3JTuARzkL3jpR097OCt9f24 t3J0cIV8ZAdANp0J3M+YGYvAONWqsb/dICqXkrYerYODCbWQP7T2fHgPwnqQi7IP9cSE tv+iNM/VSHsHQLr8Vp1CPuYUZlhCDG90pWBY4eleY28xImgFwhdX/zP/fKJSvRKL62Gk VmMyD/ia/pl29PY+nQdaODZsvwfY3koNoBY4QOTOMFmcskMIpMtfociVUkweRmjPkWs4 hMsg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i17si13258376ejf.67.2020.06.24.10.53.28; Wed, 24 Jun 2020 10:53:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405840AbgFXRwo (ORCPT + 99 others); Wed, 24 Jun 2020 13:52:44 -0400 Received: from foss.arm.com ([217.140.110.172]:49038 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405615AbgFXRwn (ORCPT ); Wed, 24 Jun 2020 13:52:43 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 38DD91FB; Wed, 24 Jun 2020 10:52:42 -0700 (PDT) Received: from e107158-lin.cambridge.arm.com (e107158-lin.cambridge.arm.com [10.1.195.21]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A0FE63F71E; Wed, 24 Jun 2020 10:52:40 -0700 (PDT) Date: Wed, 24 Jun 2020 18:52:38 +0100 From: Qais Yousef To: Joel Fernandes Cc: Doug Anderson , Peter Zijlstra , Benson Leung , Enric Balletbo i Serra , hsinyi@chromium.org, Nicolas Boichat , Gwendal Grignou , Quentin Perret , ctheegal@codeaurora.org, Guenter Roeck , LKML Subject: Re: [PATCH] cros_ec_spi: Even though we're RT priority, don't bump cpu freq Message-ID: <20200624175236.nblndmg6dfq2vr2u@e107158-lin.cambridge.arm.com> References: <20200610151818.1.I666ecd9c6f3c6405bd75831a21001b8109b6438c@changeid> <20200612125250.7bwjfnxhurdf5bwj@e107158-lin.cambridge.arm.com> <20200619153851.vigshoae3ahiy63x@e107158-lin.cambridge.arm.com> <20200623164021.lcrnwpli7wdlsn5i@e107158-lin.cambridge.arm.com> <20200624165500.idrugfgplqgi654v@e107158-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/24/20 13:35, Joel Fernandes wrote: [...] > > Doing the in-kernel opt-out via API should be fine, I think. But this will > > need to be discussed in the wider circle. It will already clash with this for > > example > > > > https://lore.kernel.org/lkml/20200619172011.5810-1-qais.yousef@arm.com/ > > Have not yet looked closer at that patch, but are you saying this > patch clashes with that work? Sorry I am operating on 2 hours of sleep > here. The series is an optimization to remove the uclamp overhead from the scheduler fastpath until the userspace uses it. It introduces a static key that is disabled by default and will cause uclamp logic not to execute in the fast path. Once the userspace starts using util clamp, which we detect by either 1. Changing uclamp value of a task with sched_setattr() 2. Modifying the default sysctl_sched_util_clamp_{min, max} 3. Modifying the default cpu.uclamp.{min, max} value in cgroup If we start having in-kernel users changing uclamp value this means drivers will cause the system to opt-in into uclamp automatically even if the userspace doesn't actually use it. I think we can solve this by providing a special API to opt-out safely. Which is the right thing to do anyway even if we didn't have this clash. Hope this makes sense. Cheers -- Qais Yousef