Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp696126ybt; Wed, 24 Jun 2020 09:02:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwZcNOgMYfWETEjRkWg8UKo06ClPNI5cVqQKFSkpoqys/5YXMdqo9lDn0IiLpGBBpszgIb X-Received: by 2002:a50:9dc4:: with SMTP id l4mr28251023edk.52.1593014536889; Wed, 24 Jun 2020 09:02:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593014536; cv=none; d=google.com; s=arc-20160816; b=b2vCR++jBGU1bPYr+p7z5C9ee8xImWrnGXjyfrJTIhVq1HBuwpcnXIZM1CVkZLKOS7 Y5xS3cIRFrOA7VaF1SgSRhTMlSKsOKN+mNp8zOL5TNN2vNWIYKtmVS5B9Nx7vaD6fuNl +c6YoDkpOA3gcjo76/SO/Bi6j0bcGzr0uc746ETTNV5zlVLV9ddBoR3TKCXIR5tuwdEK ugE86GCYN5TrOncffN8/njqLaNbneRWfjnrgxtd9RImnG/68KI1RFQSxzjdV3RNB/FYi X1qvkAhUsXX16NOrZi0yUQ1t1RZhZ25A2lN2dPzj0eM58x9IlURuFlIskDKcNCaqgYNi A4SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=v3x/1+aA2hYxMqnc8Sv46f0APOAZVpXfQ+x0uGwc2I4=; b=cpDzaZqOD1DCXOWym7ALSJUdaZXMXMND1sgqZpWA2spDJ1/YQyovXreuTh7yUQTY/k +7LguWlE60gCjcr/gzHmuufhyP5Yzm0TXs8C4/ooRl3kF/xBL5C5wCuOJ1JWKXm6ZLF3 0DdS2SJNzhBzjwKBap3IYXhj6aFM0CUsqT4Lb9b4EKS3UlaCrwhOrToIT/fw2kyJ9Lgk SJQyOQAmRIvAVjy0BuZSG4HOu26IpugoxF/fIWkj0f4/REUhq93mLj5a2tC0dDmmWySP QkIf4XFQNchzin0MN6FlqK8c9orna9yONuUfq0+G4jMlcZSwFUJ3gsL8ti0Ox8CU09o4 9bwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=1Xu6e4Jc; 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 jr3si13002860ejb.484.2020.06.24.09.01.49; Wed, 24 Jun 2020 09:02:16 -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; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=1Xu6e4Jc; 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 S2404701AbgFXQBb (ORCPT + 99 others); Wed, 24 Jun 2020 12:01:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404503AbgFXQBb (ORCPT ); Wed, 24 Jun 2020 12:01:31 -0400 Received: from merlin.infradead.org (unknown [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30CA4C061573 for ; Wed, 24 Jun 2020 09:01:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=v3x/1+aA2hYxMqnc8Sv46f0APOAZVpXfQ+x0uGwc2I4=; b=1Xu6e4JcBi33P7SGcOnGkbyQa3 miIj5qy5c0klrtgHanTlyDn4OGcORb6D6SW8aIvhajqrGfe95icUusLuz+zeIfd1zrcqYiJw5d8R1 IeiCbsdQnzssNtsCAHpwYhuTkcsS3WcS+nPRWK8KISkDaIfQSxk7PsciFL3z11yJZXPeICvLQnmoT FPWm/CCRHH18L+1qjbgbfbIYxi/OmgxG/hU+7539IpJbOtD2E6yI4t/IQjyro7gUGxr0GR8Ei02PK 4vSoQZGU3xWGftYfo2qs0bHIpQxhsssOhy3Zh63ZcTTUPceMlHYd2PrM+37N1TS15frAUhb7/qK+g x3lRcPJw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jo7pm-00064Y-Iy; Wed, 24 Jun 2020 16:01:10 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 5FF19300261; Wed, 24 Jun 2020 18:01:09 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 4D08B203CDC50; Wed, 24 Jun 2020 18:01:09 +0200 (CEST) Date: Wed, 24 Jun 2020 18:01:09 +0200 From: Peter Zijlstra To: Qais Yousef Cc: Doug Anderson , Benson Leung , Enric Balletbo i Serra , hsinyi@chromium.org, Joel Fernandes , 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: <20200624160109.GK4781@hirez.programming.kicks-ass.net> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200623164021.lcrnwpli7wdlsn5i@e107158-lin.cambridge.arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 23, 2020 at 05:40:21PM +0100, Qais Yousef wrote: > On 06/22/20 11:21, Doug Anderson wrote: > > [...] > > > > If you propose something that will help the discussion. I think based on the > > > same approach Peter has taken to prevent random RT priorities. In uclamp case > > > I think we just want to allow driver to opt RT tasks out of the default > > > boosting behavior. > > > > > > I'm a bit wary that this extra layer of tuning might create a confusion, but > > > I can't reason about why is it bad for a driver to say I don't want my RT task > > > to be boosted too. > > > > Right. I was basically just trying to say "turn my boosting off". > > > > ...so I guess you're saying that doing a v2 of my patch with the > > proper #ifdef protection wouldn't be a good way to go and I'd need to > > propose some sort of API for this? > > It's up to Peter really. > > It concerns me in general to start having in-kernel users of uclamp that might > end up setting random values (like we ended having random RT priorities), that > really don't mean a lot outside the context of the specific system it was > tested on. Given the kernel could run anywhere, it's hard to rationalize what's > okay or not. > > Opting out of default RT boost for a specific task in the kernel, could make > sense though it still concerns me for the same reasons. Is this okay for all > possible systems this can run on? > > It feels better for userspace to turn RT boosting off for all tasks if you know > your system is powerful, or use the per task API to switch off boosting for the > tasks you know they don't need it. > > But if we want to allow in-kernel users, IMO it needs to be done in > a controlled way, in a similar manner Peter changed how RT priority can be set > in the kernel. > > It would be good hear what Peter thinks. Hurmph.. I think I understand the problem, but I'm not sure what to do about it :-( Esp. given the uclamp optimization patches now under consideration. That is, if random drivers are going to install uclamps, then that will automagically enable the static_key and make the scheduler slower, even if that driver isn't particularly interesting to the user.