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


Groups > linux.kernel > #1698286

Re: [Eas-dev] [PATCH V3 1/3] sched: cpufreq: Allow remote cpufreq callbacks

From Saravana Kannan <skannan@codeaurora.org>
Newsgroups linux.kernel
Subject Re: [Eas-dev] [PATCH V3 1/3] sched: cpufreq: Allow remote cpufreq callbacks
Date 2017-07-27 22:00 +0200
Message-ID <u7X6V-21e-5@gated-at.bofh.it> (permalink)
References <u2G6J-2a4-3@gated-at.bofh.it> <u2G6K-2a4-17@gated-at.bofh.it> <u5FQR-5ft-1@gated-at.bofh.it> <u7BJ8-5vg-19@gated-at.bofh.it> <u7HOx-QN-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 07/26/2017 08:30 PM, Viresh Kumar wrote:
> On 26-07-17, 14:00, Saravana Kannan wrote:
>> No, the alternative is to pass it on to the CPU freq driver and let it
>> decide what it wants to do. That's the whole point if having a CPU freq
>> driver -- so that the generic code doesn't need to care about HW specific
>> details. Which is the point I was making in an earlier email to Viresh's
>> patch -- we shouldn't be doing any CPU check for the call backs at the
>> scheduler or ever governor level.
>>
>> That would simplify this whole thing by deleting a bunch of code. And having
>> much simpler checks in those drivers that actually have to deal with their
>> HW specific details.
>
> So what you are saying is that we go and update (almost) every cpufreq
> driver we have today and make their ->target() callbacks return early
> if they don't support switching frequency remotely ? Is that really
> simplifying anything?

Yes. Simplifying isn't always about number of lines of code. It's also 
about abstraction. Having generic scheduler code care about HW details 
doesn't seem nice.

It'll literally one simple check (cpu == smp_processor_id()) or (cpu 
"in" policy->cpus).

Also, this is only for drivers that currently support fast switching. 
How many of those do you have?

> The core already has most of the data required and I believe that we
> need to handle it in the governor's code as is handled in this series.

Clearly, it doesn't. You are just making assumptions about HW.

> To solve the problem that you have been reporting (update from any
> CPU), we need something like this which I earlier suggested and I
> will come back to it after this series is gone. Don't want to
> complicate things here unnecessarily.
>
> https://marc.info/?l=linux-kernel&m=148906012827786&w=2

I'm okay with handling it later. I'm just saying that if we are going to 
go back and debate the CPU check, then maybe it's better do it in one 
series.

-Saravana

-- 
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

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


Thread

Re: [PATCH V3 1/3] sched: cpufreq: Allow remote cpufreq callbacks Peter Zijlstra <peterz@infradead.org> - 2017-07-21 15:10 +0200
  Re: [PATCH V3 1/3] sched: cpufreq: Allow remote cpufreq callbacks Viresh Kumar <viresh.kumar@linaro.org> - 2017-07-24 13:10 +0200
    Re: [PATCH V3 1/3] sched: cpufreq: Allow remote cpufreq callbacks Peter Zijlstra <peterz@infradead.org> - 2017-07-24 15:50 +0200
      Re: [PATCH V3 1/3] sched: cpufreq: Allow remote cpufreq callbacks Viresh Kumar <viresh.kumar@linaro.org> - 2017-07-26 08:30 +0200
        Re: [PATCH V3 1/3] sched: cpufreq: Allow remote cpufreq callbacks Peter Zijlstra <peterz@infradead.org> - 2017-07-26 10:20 +0200
        Re: [PATCH V3 1/3] sched: cpufreq: Allow remote cpufreq callbacks "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-07-26 19:40 +0200
  Re: [Eas-dev] [PATCH V3 1/3] sched: cpufreq: Allow remote cpufreq  callbacks Saravana Kannan <skannan@codeaurora.org> - 2017-07-26 23:10 +0200
    Re: [Eas-dev] [PATCH V3 1/3] sched: cpufreq: Allow remote cpufreq  callbacks Viresh Kumar <viresh.kumar@linaro.org> - 2017-07-27 05:40 +0200
      Re: [Eas-dev] [PATCH V3 1/3] sched: cpufreq: Allow remote cpufreq  callbacks Saravana Kannan <skannan@codeaurora.org> - 2017-07-27 22:00 +0200
        Re: [Eas-dev] [PATCH V3 1/3] sched: cpufreq: Allow remote cpufreq callbacks "Joel Fernandes (Google)" <joel.opensrc@gmail.com> - 2017-07-28 06:40 +0200
        Re: [Eas-dev] [PATCH V3 1/3] sched: cpufreq: Allow remote cpufreq  callbacks Viresh Kumar <viresh.kumar@linaro.org> - 2017-07-28 08:10 +0200
          Re: [Eas-dev] [PATCH V3 1/3] sched: cpufreq: Allow remote cpufreq  callbacks Saravana Kannan <skannan@codeaurora.org> - 2017-07-28 23:10 +0200
            Re: [Eas-dev] [PATCH V3 1/3] sched: cpufreq: Allow remote cpufreq  callbacks Viresh Kumar <viresh.kumar@linaro.org> - 2017-07-31 06:00 +0200

csiph-web