lkml.org 
[lkml]   [2020]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] cros_ec_spi: Even though we're RT priority, don't bump cpu freq
+CC Qais [FYI]

On Thursday 11 Jun 2020 at 10:48:40 (-0700), Doug Anderson wrote:
> Hrm. I guess my first instinct is to say that we still want this
> patch even if we have something that is applied more globally.

Fair enough.

> Specifically it sounds as if the patch you point at is suggesting that
> we'd tweak the boost value to something other than max but we'd still
> have a boost value. In the case of cros_ec_spi I don't believe we
> need any boost value at all, so my patch would still be useful. The
> computational needs of cros_ec_spi are very modest and it can do its
> work at lower CPU frequencies just fine. It just can't be interrupted
> for large swaths of time.
>
>
> > IOW, how do you feel about 20200511154053.7822-1-qais.yousef@arm.com ?
>
> I'm not totally a fan, but I'm definitely not an expert in this area
> (I've also only read the patch description and not the patch or the
> whole thread). I really don't want yet another value that I need to
> tune from board to board. Even worse, this tuning value isn't
> board-specific but a combination of board and software specific. By
> this, I'd imagine a scenario where you're using a real-time task to
> get audio decoding done within a certain latency. I guess you'd tune
> this value to make sure that you can get all your audio decoding done
> in time but also not burn extra power. Now, imagine that the OS
> upgrades and the audio task suddenly has to decode more complex
> streams. You've got to go across all of your boards and re-tune every
> one? ...or, nobody thinks about it and older boards start getting
> stuttery audio? Perhaps the opposite happens and someone comes up
> with a newer lower-cpu-intensive codec and you could save power.
> Sounds like a bit of a nightmare.
>
> I'd rather have a boolean value: boost all RT threads to max vs. don't
> boost all RT threads to max. Someone that just wanted RT stuff to run
> as fast as possible without any hassle on their system and didn't care
> about power efficiency could turn this on. Anyone who really cared
> about power could turn this off and then could find a more targeted
> way to boost things, hopefully in a way that doesn't require tuning.
> One option would be to still boost the CPU to max but only for certain
> tasks known to be really latency sensitive. Another might be to
> somehow measure whether or not the task is making its deadlines and
> boost the CPU frequency up if deadlines are not being met. I'm sure
> there are fancier ways.
>
> ...of course, I believe your patch allows me to do what I want: I can
> just set the default boost to 0. It just leaves in the temptation for
> others to require a default boost of something else and then I'm stuck
> in my tuning nightmare.

Right, so I am not disagreeing at all with the above. FWIW, I expect
Android to set this default value to 0 as you mentioned, so that uclamp
basically becomes 'opt-in' for _all_ tasks, including RT.

Now, given that Qais' patch is commiting something to userspace, I think
it makes sense to expose the full range rather than a boolean value, as
it's probably more future-proof. That is, if we expose a boolean knob
now, and somebody wants to be able to set a default value in the middle
in a few years, we'll have to add another knob, and maintain both (which
sucks). But it's just my personal opinion. Feel free to jump in the
other thread if you feel differently :)

Cheers,
Quentin

\
 
 \ /
  Last update: 2020-06-12 11:25    [W:0.598 / U:0.568 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site