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


Groups > linux.kernel > #1328125

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

From "Rafael J. Wysocki" <rjw@rjwysocki.net>
Newsgroups linux.kernel
Subject Re: [PATCH 3/3 v3] cpufreq: governor: Replace timers with utilization update callbacks
Date 2016-02-06 00:10 +0100
Message-ID <qYXFN-6Ni-25@gated-at.bofh.it> (permalink)
References <qWqbf-1BM-3@gated-at.bofh.it> <qYIx4-57t-5@gated-at.bofh.it> <qYOMb-P6-43@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Friday, February 05, 2016 02:36:54 PM Rafael J. Wysocki wrote:
> On Fri, Feb 5, 2016 at 7:50 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> > Will suck some more blood, sorry about that :)
> >
> > On 05-02-16, 02:28, Rafael J. Wysocki wrote:
> >> The v3 addresses some review comments from Viresh and a couple of issues found
> >> by me.  Changes from the previous version:
> >> - Synchronize gov_cancel_work() with the (new) irq_work properly.
> >> - Add a comment about the (new) memory barrier.
> >> - Move samle_delay_ns to "shared" (struct cpu_common_dbs_info) so it is the
> >
> > sample_delay_ns was already there, you moved last_sample_time instead :)
> >
> >> @@ -139,7 +141,11 @@ struct cpu_common_dbs_info {
> >>       struct mutex timer_mutex;
> >>
> >>       ktime_t time_stamp;
> >> +     u64 last_sample_time;
> >> +     s64 sample_delay_ns;
> >>       atomic_t skip_work;
> >> +     struct irq_work irq_work;
> >
> > Just for my understanding, why can't we schedule a normal work directly? Is it
> > because of scheduler's hotpath and queue_work() is slow?
> 
> No, that's not the reason.
> 
> That path can't call wake_up_process() as it may be holding the locks
> this would have attempted to grab.

My answer wasn't really to the point here.

Among other things, the scheduler path cannot use normal spinlocks.  It can
only use raw spinlocks and this means no work queuing from it.

Thanks,
Rafael

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


Thread

[PATCH 3/3] cpufreq: governor: Replace timers with utilization update callbacks "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-01-30 00:00 +0100
  [Update][PATCH 3/3] cpufreq: governor: Replace timers with utilization update callbacks "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-02-03 02:20 +0100
    Re: [Update][PATCH 3/3] cpufreq: governor: Replace timers with  utilization update callbacks Viresh Kumar <viresh.kumar@linaro.org> - 2016-02-04 06:00 +0100
      Re: [Update][PATCH 3/3] cpufreq: governor: Replace timers with utilization update callbacks "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-02-04 12:00 +0100
    [PATCH 3/3 v3] cpufreq: governor: Replace timers with utilization update callbacks "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-02-05 02:30 +0100
      Re: [PATCH 3/3 v3] cpufreq: governor: Replace timers with  utilization update callbacks Viresh Kumar <viresh.kumar@linaro.org> - 2016-02-05 08:00 +0100
        Re: [PATCH 3/3 v3] cpufreq: governor: Replace timers with utilization  update callbacks "Rafael J. Wysocki" <rafael@kernel.org> - 2016-02-05 14:40 +0100
          Re: [PATCH 3/3 v3] cpufreq: governor: Replace timers with utilization  update callbacks Viresh Kumar <viresh.kumar@linaro.org> - 2016-02-05 16:10 +0100
            Re: [PATCH 3/3 v3] cpufreq: governor: Replace timers with utilization update callbacks "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-02-06 00:20 +0100
              Re: [PATCH 3/3 v3] cpufreq: governor: Replace timers with  utilization update callbacks Viresh Kumar <viresh.kumar@linaro.org> - 2016-02-07 10:20 +0100
                Re: [PATCH 3/3 v3] cpufreq: governor: Replace timers with utilization update callbacks "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-02-07 15:50 +0100
                Re: [PATCH 3/3 v3] cpufreq: governor: Replace timers with utilization update callbacks "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-02-08 03:10 +0100
                Re: [PATCH 3/3 v3] cpufreq: governor: Replace timers with  utilization update callbacks Viresh Kumar <viresh.kumar@linaro.org> - 2016-02-08 13:00 +0100
                Re: [PATCH 3/3 v3] cpufreq: governor: Replace timers with utilization  update callbacks "Rafael J. Wysocki" <rafael@kernel.org> - 2016-02-08 14:00 +0100
                Re: [PATCH 3/3 v3] cpufreq: governor: Replace timers with utilization  update callbacks "Rafael J. Wysocki" <rafael@kernel.org> - 2016-02-08 14:50 +0100
          Re: [PATCH 3/3 v3] cpufreq: governor: Replace timers with utilization update callbacks "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-02-06 00:10 +0100
      [PATCH 3/3 v4] cpufreq: governor: Replace timers with utilization update callbacks "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-02-06 04:50 +0100
        Re: [PATCH 3/3 v4] cpufreq: governor: Replace timers with  utilization update callbacks Viresh Kumar <viresh.kumar@linaro.org> - 2016-02-07 10:30 +0100
          Re: [PATCH 3/3 v4] cpufreq: governor: Replace timers with utilization update callbacks "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-02-07 15:40 +0100
        [PATCH 3/3 v5] cpufreq: governor: Replace timers with utilization update callbacks "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-02-07 16:00 +0100
          Re: [PATCH 3/3 v5] cpufreq: governor: Replace timers with  utilization update callbacks Viresh Kumar <viresh.kumar@linaro.org> - 2016-02-07 16:40 +0100

csiph-web