Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1330815

Re: [PATCH 0/3] cpufreq: Replace timers with utilization update callbacks

From Steve Muckle <steve.muckle@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH 0/3] cpufreq: Replace timers with utilization update callbacks
Date 2016-02-10 02:10 +0100
Message-ID <r0rs6-3Ax-9@gated-at.bofh.it> (permalink)
References <qWqbf-1BM-3@gated-at.bofh.it> <r04vw-4wh-3@gated-at.bofh.it> <r04Yy-50D-17@gated-at.bofh.it> <r0mLN-tr-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 02/09/2016 12:05 PM, Rafael J. Wysocki wrote:
>>> One concern I had was, given that the lone scheduler update hook is in
>>> CFS, is it possible for governor updates to be stalled due to RT or DL
>>> task activity?
>>
>> I don't think they may be completely stalled, but I'd prefer Peter to
>> answer that as he suggested to do it this way.
> 
> In any case, if that concern turns out to be significant in practice, it may
> be addressed like in the appended modification of patch [1/3] from the $subject
> series.
> 
> With that things look like before from the cpufreq side, but the other sched
> classes also get a chance to trigger a cpufreq update.  The drawback is the
> cpu_clock() call instead of passing the time value from update_load_avg(), but
> I guess we can live with that if necessary.
> 
> FWIW, this modification doesn't seem to break things on my test machine.
> 
...
> Index: linux-pm/kernel/sched/rt.c
> ===================================================================
> --- linux-pm.orig/kernel/sched/rt.c
> +++ linux-pm/kernel/sched/rt.c
> @@ -2212,6 +2212,9 @@ static void task_tick_rt(struct rq *rq,
>  
>  	update_curr_rt(rq);
>  
> +	/* Kick cpufreq to prevent it from stalling. */
> +	cpufreq_kick();
> +
>  	watchdog(rq, p);
>  
>  	/*
> Index: linux-pm/kernel/sched/deadline.c
> ===================================================================
> --- linux-pm.orig/kernel/sched/deadline.c
> +++ linux-pm/kernel/sched/deadline.c
> @@ -1197,6 +1197,9 @@ static void task_tick_dl(struct rq *rq,
>  {
>  	update_curr_dl(rq);
>  
> +	/* Kick cpufreq to prevent it from stalling. */
> +	cpufreq_kick();
> +
>  	/*
>  	 * Even when we have runtime, update_curr_dl() might have resulted in us
>  	 * not being the leftmost task anymore. In that case NEED_RESCHED will

I think additional hooks such as enqueue/dequeue would be needed in
RT/DL. The task tick callbacks will only run if a task in that class is
executing at the time of the tick. There could be intermittent RT/DL
task activity in a frequency domain (the only task activity there, no
CFS tasks) that doesn't happen to overlap the tick. Worst case the task
activity could be periodic in such a way that it never overlaps the tick
and the update is never made.

thanks,
steve

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH 0/3] cpufreq: Replace timers with utilization update callbacks "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-02-09 21:10 +0100
  Re: [PATCH 0/3] cpufreq: Replace timers with utilization update  callbacks Steve Muckle <steve.muckle@linaro.org> - 2016-02-10 02:10 +0100
    Re: [PATCH 0/3] cpufreq: Replace timers with utilization update callbacks "Rafael J. Wysocki" <rafael@kernel.org> - 2016-02-10 03:00 +0100
      Re: [PATCH 0/3] cpufreq: Replace timers with utilization update callbacks "Rafael J. Wysocki" <rafael@kernel.org> - 2016-02-10 04:10 +0100
        Re: [PATCH 0/3] cpufreq: Replace timers with utilization update  callbacks Steve Muckle <steve.muckle@linaro.org> - 2016-02-10 20:50 +0100
          Re: [PATCH 0/3] cpufreq: Replace timers with utilization update callbacks "Rafael J. Wysocki" <rafael@kernel.org> - 2016-02-10 22:50 +0100
            Re: [PATCH 0/3] cpufreq: Replace timers with utilization update  callbacks Steve Muckle <steve.muckle@linaro.org> - 2016-02-10 23:10 +0100
              Re: [PATCH 0/3] cpufreq: Replace timers with utilization update callbacks "Rafael J. Wysocki" <rafael@kernel.org> - 2016-02-10 23:20 +0100
    Re: [PATCH 0/3] cpufreq: Replace timers with utilization update  callbacks Peter Zijlstra <peterz@infradead.org> - 2016-02-11 13:10 +0100
      Re: [PATCH 0/3] cpufreq: Replace timers with utilization update  callbacks Juri Lelli <juri.lelli@arm.com> - 2016-02-11 13:30 +0100
        Re: [PATCH 0/3] cpufreq: Replace timers with utilization update  callbacks Peter Zijlstra <peterz@infradead.org> - 2016-02-11 16:30 +0100
          Re: [PATCH 0/3] cpufreq: Replace timers with utilization update callbacks Vincent Guittot <vincent.guittot@linaro.org> - 2016-02-11 19:30 +0100
            Re: [PATCH 0/3] cpufreq: Replace timers with utilization update  callbacks Peter Zijlstra <peterz@infradead.org> - 2016-02-12 15:10 +0100
              Re: [PATCH 0/3] cpufreq: Replace timers with utilization update callbacks Vincent Guittot <vincent.guittot@linaro.org> - 2016-02-12 15:50 +0100
      Re: [PATCH 0/3] cpufreq: Replace timers with utilization update  callbacks Steve Muckle <steve.muckle@linaro.org> - 2016-02-11 18:10 +0100
        Re: [PATCH 0/3] cpufreq: Replace timers with utilization update callbacks "Rafael J. Wysocki" <rafael@kernel.org> - 2016-02-11 18:40 +0100
          Re: [PATCH 0/3] cpufreq: Replace timers with utilization update  callbacks Peter Zijlstra <peterz@infradead.org> - 2016-02-11 18:40 +0100
        Re: [PATCH 0/3] cpufreq: Replace timers with utilization update  callbacks Peter Zijlstra <peterz@infradead.org> - 2016-02-11 18:40 +0100
          Re: [PATCH 0/3] cpufreq: Replace timers with utilization update  callbacks Steve Muckle <steve.muckle@linaro.org> - 2016-02-11 20:00 +0100
            Re: [PATCH 0/3] cpufreq: Replace timers with utilization update callbacks "Rafael J. Wysocki" <rafael@kernel.org> - 2016-02-11 20:10 +0100
              Re: [PATCH 0/3] cpufreq: Replace timers with utilization update callbacks "Rafael J. Wysocki" <rafael@kernel.org> - 2016-02-12 14:50 +0100
            Re: [PATCH 0/3] cpufreq: Replace timers with utilization update  callbacks Peter Zijlstra <peterz@infradead.org> - 2016-02-12 15:20 +0100
              Re: [PATCH 0/3] cpufreq: Replace timers with utilization update callbacks "Rafael J. Wysocki" <rafael@kernel.org> - 2016-02-12 17:10 +0100
                Re: [PATCH 0/3] cpufreq: Replace timers with utilization update callbacks "Rafael J. Wysocki" <rafael@kernel.org> - 2016-02-12 17:20 +0100
                Re: [PATCH 0/3] cpufreq: Replace timers with utilization update callbacks Ashwin Chaugule <ashwin.chaugule@linaro.org> - 2016-02-12 18:00 +0100
                Re: [PATCH 0/3] cpufreq: Replace timers with utilization update callbacks "Rafael J. Wysocki" <rafael@kernel.org> - 2016-02-13 00:20 +0100
                RE: [PATCH 0/3] cpufreq: Replace timers with utilization update callbacks "Doug Smythies" <dsmythies@telus.net> - 2016-02-12 18:10 +0100
                Re: [PATCH 0/3] cpufreq: Replace timers with utilization update callbacks "Rafael J. Wysocki" <rafael@kernel.org> - 2016-02-13 00:20 +0100
  Re: [PATCH 0/3] cpufreq: Replace timers with utilization update  callbacks Juri Lelli <juri.lelli@arm.com> - 2016-02-10 13:40 +0100
    Re: [PATCH 0/3] cpufreq: Replace timers with utilization update callbacks "Rafael J. Wysocki" <rafael@kernel.org> - 2016-02-10 14:30 +0100
      Re: [PATCH 0/3] cpufreq: Replace timers with utilization update  callbacks Juri Lelli <juri.lelli@arm.com> - 2016-02-10 15:10 +0100
        Re: [PATCH 0/3] cpufreq: Replace timers with utilization update callbacks "Rafael J. Wysocki" <rafael@kernel.org> - 2016-02-10 15:30 +0100
          Re: [PATCH 0/3] cpufreq: Replace timers with utilization update  callbacks Juri Lelli <juri.lelli@arm.com> - 2016-02-10 15:50 +0100
            Re: [PATCH 0/3] cpufreq: Replace timers with utilization update callbacks "Rafael J. Wysocki" <rafael@kernel.org> - 2016-02-10 16:50 +0100
              Re: [PATCH 0/3] cpufreq: Replace timers with utilization update  callbacks Juri Lelli <juri.lelli@arm.com> - 2016-02-10 17:10 +0100
  Re: [PATCH 0/3] cpufreq: Replace timers with utilization update  callbacks Peter Zijlstra <peterz@infradead.org> - 2016-02-11 13:00 +0100
    Re: [PATCH 0/3] cpufreq: Replace timers with utilization update callbacks "Rafael J. Wysocki" <rafael@kernel.org> - 2016-02-11 13:10 +0100
      Re: [PATCH 0/3] cpufreq: Replace timers with utilization update  callbacks Peter Zijlstra <peterz@infradead.org> - 2016-02-11 16:30 +0100
        Re: [PATCH 0/3] cpufreq: Replace timers with utilization update callbacks "Rafael J. Wysocki" <rafael@kernel.org> - 2016-02-11 17:00 +0100
      Re: [PATCH 0/3] cpufreq: Replace timers with utilization update callbacks "Rafael J. Wysocki" <rafael@kernel.org> - 2016-02-11 21:50 +0100

csiph-web