linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Qais Yousef <qais.yousef@arm.com>
To: Doug Anderson <dianders@chromium.org>
Cc: Quentin Perret <qperret@google.com>,
	Benson Leung <bleung@chromium.org>,
	Enric Balletbo i Serra <enric.balletbo@collabora.com>,
	hsinyi@chromium.org, Joel Fernandes <joelaf@google.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Nicolas Boichat <drinkcat@chromium.org>,
	Gwendal Grignou <gwendal@chromium.org>,
	ctheegal@codeaurora.org, Guenter Roeck <groeck@chromium.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] cros_ec_spi: Even though we're RT priority, don't bump cpu freq
Date: Tue, 23 Jun 2020 16:56:05 +0100	[thread overview]
Message-ID: <20200623155507.5l6ck4hder2px3ii@e107158-lin.cambridge.arm.com> (raw)
In-Reply-To: <CAD=FV=V0YCS69uErFnY-cF_v44mDfAe4AWa+K+U6mQR+TNLkww@mail.gmail.com>

On 06/22/20 11:19, Doug Anderson wrote:

[...]

> > Hmm I thought OEMs who ship stuff that are based on Chrome OS would have to do
> > the final tuning here, which would be based on the recommendation of the SoC
> > vendor. And I'm being overly generic here to think not only SoC from Intel
> > which traditionally they have been treated in different ways.
> >
> > I think you provide a generic stack for OEMs, no?
> 
> No, that's the Android way.  The only way Chrome OS can ship updates
> for the whole fleet every ~6 weeks and support it for so many years is
> that all the builds and updates happen on Google servers.  The only
> way Google can maintain this is to not have a separate kernel code
> base for every single variant of every single board.

I was referring to userspace tuning, which I expected to be platform specific.
Assuming the devices share the same kernel. At least in the context of uclamp
and RT tuning that should be possible.

I appreciate that you want to ship a simple generic setup on as many
devices. But there will be a trade-off to make between optimal tuning and
keeping things simple and generic. The latter is perfectly fine goal to have
of course. Others who want to tune more they're free to do so too as well.

> 
> 
> > Generally for RT tasks, Linux always required an admin to do the tuning. And to
> > provide an automatic solution that fits all is not easy to happen, because what
> > ultimately is important for userspace, is only known by the userspace.
> >
> > This is an interesting problem for me personally that I have been trying to
> > look at in my free time. On general purpose systems, it's hard to reason about
> > what's important because, as you say, you distribute something that should
> > target a wide range of platforms. And sometimes the end user (like a person
> > installing Ubuntu Desktop on their laptop), have no clue what a driver is even
> > to pick the right tuning for all RT tasks in their system.
> >
> > But this problem already exists and catching up with this will need more work
> > from both distros and maybe kernel. I can't see a possible situation where the
> > kernel can do all the tuning without userspace providing more info anyway.
> >
> > The per-device weirdness you're talking about is just how the way goes in
> > a world where there are many SoCs that are created to target different budgets
> > and use cases.
> 
> I think it's sane for the OS to do very high level tuning, like "this
> platform has an underpowered CPU and being fast is more important than
> battery life, so error on the side of running fast" or "this platform
> has a fast SSD so tune disk algorithms appropriately".  ...but picking
> specific values gets tricky.

You can always use the per-task API to boost that task to maximum, if power is
not your concern. From user-space ;-)

If you're power conscious too, yeah there's no way but to test for the minimum
value that gives you what you want. The task can try to regulate itself too if
it can observe when it's not running fast enough (notices a glitch?).

You can get fancy if you want, depending on your goal.

It's hard to get the best though with one size fits all.

HTH

--
Qais Yousef

  reply	other threads:[~2020-06-23 15:56 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-10 22:18 [PATCH] cros_ec_spi: Even though we're RT priority, don't bump cpu freq Douglas Anderson
2020-06-11 11:03 ` Quentin Perret
2020-06-11 17:48   ` Doug Anderson
2020-06-12  9:24     ` Quentin Perret
2020-06-12 12:34       ` Qais Yousef
2020-06-12 13:47         ` Quentin Perret
2020-06-12 14:00           ` Qais Yousef
2020-06-18 21:31         ` Doug Anderson
2020-06-19 15:31           ` Qais Yousef
2020-06-22 18:19             ` Doug Anderson
2020-06-23 15:56               ` Qais Yousef [this message]
2020-06-12 12:52 ` Qais Yousef
2020-06-18 21:18   ` Doug Anderson
2020-06-19 15:38     ` Qais Yousef
2020-06-22 18:21       ` Doug Anderson
2020-06-23 16:40         ` Qais Yousef
2020-06-24 15:49           ` Joel Fernandes
2020-06-24 16:55             ` Qais Yousef
2020-06-24 17:35               ` Joel Fernandes
2020-06-24 17:52                 ` Qais Yousef
2020-06-24 17:55                   ` Joel Fernandes
2020-06-24 18:29                     ` Doug Anderson
2020-06-25 14:20                       ` Qais Yousef
2020-06-24 16:01           ` Peter Zijlstra
2020-06-24 17:14             ` Qais Yousef
2020-06-24 15:56     ` Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200623155507.5l6ck4hder2px3ii@e107158-lin.cambridge.arm.com \
    --to=qais.yousef@arm.com \
    --cc=bleung@chromium.org \
    --cc=ctheegal@codeaurora.org \
    --cc=dianders@chromium.org \
    --cc=drinkcat@chromium.org \
    --cc=enric.balletbo@collabora.com \
    --cc=groeck@chromium.org \
    --cc=gwendal@chromium.org \
    --cc=hsinyi@chromium.org \
    --cc=joelaf@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=qperret@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).