Message ID | 20170706094948.8779-1-dietmar.eggemann@arm.com |
---|---|
Headers | show |
Series | arm, arm64: frequency- and cpu-invariant accounting support for task scheduler | expand |
Sure this patch looks pretty useful, but ... On 06-07-17, 10:49, Dietmar Eggemann wrote: > diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c > index 63fb3f945d21..b4481cff14bf 100644 > --- a/drivers/base/arch_topology.c > +++ b/drivers/base/arch_topology.c > @@ -22,12 +22,7 @@ > #include <linux/string.h> > #include <linux/sched/topology.h> > > -static DEFINE_PER_CPU(unsigned long, freq_scale) = SCHED_CAPACITY_SCALE; > - > -unsigned long topology_get_freq_scale(struct sched_domain *sd, int cpu) > -{ > - return per_cpu(freq_scale, cpu); > -} > +DEFINE_PER_CPU(unsigned long, freq_scale) = SCHED_CAPACITY_SCALE; ... you just undo what you did earlier in this series, and that is somewhat discouraged. What about making this as the first patch of the series and move only the below part to the header. And then you can add the above part to the right place in the first attempt itself? But maybe this is all okay :) -- viresh
On 06/07/17 11:57, Viresh Kumar wrote: > Sure this patch looks pretty useful, but ... > > On 06-07-17, 10:49, Dietmar Eggemann wrote: >> diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c >> index 63fb3f945d21..b4481cff14bf 100644 >> --- a/drivers/base/arch_topology.c >> +++ b/drivers/base/arch_topology.c >> @@ -22,12 +22,7 @@ >> #include <linux/string.h> >> #include <linux/sched/topology.h> >> >> -static DEFINE_PER_CPU(unsigned long, freq_scale) = SCHED_CAPACITY_SCALE; >> - >> -unsigned long topology_get_freq_scale(struct sched_domain *sd, int cpu) >> -{ >> - return per_cpu(freq_scale, cpu); >> -} >> +DEFINE_PER_CPU(unsigned long, freq_scale) = SCHED_CAPACITY_SCALE; > > ... you just undo what you did earlier in this series, and that is somewhat > discouraged. > > What about making this as the first patch of the series and move only the below > part to the header. And then you can add the above part to the right place in > the first attempt itself? > > But maybe this is all okay :) I just wanted to show people what we gain in completely inlining FIE and CIE on ARM64 in the scheduler hot-path. But yes, with the next version I want to fold this inlining into the actual FIE/CIE patch.
On 13/07/17 13:40, Sudeep Holla wrote: > > > On 11/07/17 16:21, Dietmar Eggemann wrote: >> On 11/07/17 07:39, Viresh Kumar wrote: >>> On 10-07-17, 14:46, Rafael J. Wysocki wrote: [...] >> Like I said in the other email, since for (future) >> arm/arm64 fast-switch driver, the return value of >> cpufreq_driver->fast_switch() does not give us the information that the >> frequency value did actually change, we have to implement > > I was under the impression that we strictly don't care about that > information when I started exploring the fast_switch with the standard > firmware interface on ARM platforms(until if and when ARM provides an > instruction to achieve that). > > If f/w failed to change the frequency, will that be not corrected in the > next sample or instance. I would like to know the impact of absence of > such notifications. In the meantime we agreed that we have to invoke frequency invariance from within the cpufreq driver. For a fast-switch driver I would have to put the call to arch_set_freq_scale() somewhere where I know that the frequency has been set. Without a notification (from the firmware) that the frequency has been set, I would have to call arch_set_freq_scale() somewhere in the driver::fast_switch() call assuming that the frequency has been actually set. [...]