Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp736817ybt; Wed, 24 Jun 2020 09:58:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwMAtMwlFfF/GL+KVf8eEUA5Xul5tgjz2xiNHuPozRT38AML5Dg+c5jqVxVf87F8k84tHdP X-Received: by 2002:a17:906:36d0:: with SMTP id b16mr3787169ejc.437.1593017920005; Wed, 24 Jun 2020 09:58:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593017919; cv=none; d=google.com; s=arc-20160816; b=zaIfM9XW53flBO6nlzyfMHY60QKRjrc8TPYggTH5br5RJEHer5v9SzewNh+EnvDvXH aSzxhGL4P78Do8Jc0ZVDRznTJtAT8xFUZfKaMEuPlK8HztWrMANZUtAtZlixlx+JZgPn xEUKoZnzWgask7zDhrRZYUjJEn4yevD2owWlrXx6NrfSSZWZvYc0Dc/J9nVPTFliCHyO jc51/kctFkRzzIbEUdx8UyxoDIQwBdJgzU2fJAvH9zUBi1tCln3ivmUWwYQIcMNNSk11 FpzwjRq0AO5FsLHal+bIXz1rC5g2ftPttCNpJqVaDKkE893MpVjPPBvQ1XX0oV5KoPs7 01jQ== 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=Wi9/rZPD10e07TwtBv9P6w+PQ0TJu4Buzi5SzlDgn+U=; b=kcX9QZQTCEvhxp6eRV2RyNedAqEM5bp/Fp04L71xVh3h/mkbaMc5eogARckVfPkDkJ /8MfdsIyJABRK4XmF432bZWzxuMZFJzdcKEjGtYeyewenJm87fQL0EU3Yr0U2hshYLVV D5NPiOBzk6OVdY/822PBps2pXQc2suvk6nrMcVc55d9neeLFHMH5pF8qOzeN5Z2ObN4a 5+ka7lAO5eTTAM9HAhtz9YOa/wvO7jNZVddFbxyyySO9YHZFGpH6dE2RGK1mgrDtPIr/ XlFQmCAhmGbnyUlnSEbZWdbuqeIgP3QwMgSuICaGH9Csdsl1lzMRvfFXkBrI8RTDY3jm ystg== 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 j1si14458716edj.464.2020.06.24.09.58.17; Wed, 24 Jun 2020 09:58:39 -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 S2404892AbgFXQzG (ORCPT + 99 others); Wed, 24 Jun 2020 12:55:06 -0400 Received: from foss.arm.com ([217.140.110.172]:43384 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404797AbgFXQzF (ORCPT ); Wed, 24 Jun 2020 12:55:05 -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 816071FB; Wed, 24 Jun 2020 09:55:04 -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 EE8273F71E; Wed, 24 Jun 2020 09:55:02 -0700 (PDT) Date: Wed, 24 Jun 2020 17:55:00 +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: <20200624165500.idrugfgplqgi654v@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> 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 11:49, Joel Fernandes wrote: > On Tue, Jun 23, 2020 at 12:40 PM 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. > > It seems a bit of a hack, but really the commit message says the Which part is the hack, the userspace control? It is how Linux expects things to work AFAIU. But I do agree there's a hole for general purpose userspace that wants to run and manage a diverse range of hardware. I still think it's the job of device manufacturers/system integrator. But not many ship Linux by default. Though I thought ChromeOS is the exception here. > driver is not expected to take a lot of CPU capacity so it should be > expected to work across platforms. It is likely to behave better than > how it behaves now. 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/ Thanks -- Qais Yousef