lkml.org 
[lkml]   [2016]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFCv7 PATCH 03/10] sched: scheduler-driven cpu frequency selection
Date
On Thursday, February 25, 2016 04:55:57 AM Rafael J. Wysocki wrote:
> Hi,
>

[cut]

> > + while (true) {
> > + set_current_state(TASK_INTERRUPTIBLE);
> > + if (kthread_should_stop()) {
> > + set_current_state(TASK_RUNNING);
> > + break;
> > + }
> > + new_request = gd->requested_freq;
> > + if (!gd->enabled || new_request == last_request) {
>
> This generally is a mistake.
>
> You can't assume that if you had requested a CPU to enter a specific P-state,
> that state was actually entered. In the platform-coordinated case the hardware
> (or firmware) may choose to ignore your request and you won't be told about
> that.
>
> For this reason, you generally need to make the request every time even if it
> is identical to the previous one. Even in the one-CPU-per-policy case there
> may be HW coordination you don't know about.

Please scratch this bit, actually (and analogous comments below).

It is reasonable to expect that the platform will remember your last request,
so you don't have to repeat it.

Which means that I can optimize the schedutil thing somewhat. :-)

Thanks,
Rafael

\
 
 \ /
  Last update: 2016-02-25 12:41    [W:0.165 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site