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


Groups > linux.kernel > #1666554

Re: [PATCH 2/6] drivers base/arch_topology: frequency-invariant load-tracking support

From Juri Lelli <juri.lelli@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/6] drivers base/arch_topology: frequency-invariant load-tracking support
Date 2017-06-15 10:30 +0200
Message-ID <tSyka-5P-17@gated-at.bofh.it> (permalink)
References <tQ0wh-1oo-5@gated-at.bofh.it> <tQ0wh-1oo-3@gated-at.bofh.it> <tRyvV-3dT-27@gated-at.bofh.it> <tSbnA-2oc-15@gated-at.bofh.it> <tSgdA-5BT-29@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi,

On 14/06/17 15:08, Vincent Guittot wrote:
> On 14 June 2017 at 09:55, Dietmar Eggemann <dietmar.eggemann@arm.com> wrote:
> >
> > On 06/12/2017 04:27 PM, Vincent Guittot wrote:
> > > On 8 June 2017 at 09:55, Dietmar Eggemann <dietmar.eggemann@arm.com> wrote:
> >
> > Hi Vincent,
> >
> > Thanks for the review!
> >
> > [...]
> >
> > >> @@ -225,8 +265,14 @@ static int __init register_cpufreq_notifier(void)
> > >>
> > >>          cpumask_copy(cpus_to_visit, cpu_possible_mask);
> > >>
> > >> -       return cpufreq_register_notifier(&init_cpu_capacity_notifier,
> > >> -                                        CPUFREQ_POLICY_NOTIFIER);
> > >> +       ret = cpufreq_register_notifier(&init_cpu_capacity_notifier,
> > >> +                                       CPUFREQ_POLICY_NOTIFIER);
> > >> +
> > >> +       if (ret)
> > >
> > > Don't you have to free memory allocated for cpus_to_visit in case of
> > > errot ? it was not done before your patch as well
> >
> > Yes, we should free cpus_to_visit if the policy notifier registration
> > fails. But IMHO also, once the parsing of the capacity-dmips-mhz property
> > is done. free cpus_to_visit is only used in the notifier call
> > init_cpu_capacity_callback() after being allocated and initialized in
> > register_cpufreq_notifier().
> >
> > We could add something like this as the first patch of this set. Only
> > mildly tested on Juno. Juri, what do you think?
> >
> > Author: Dietmar Eggemann <dietmar.eggemann@arm.com>
> > Date:   Tue Jun 13 23:21:59 2017 +0100
> >
> >     drivers base/arch_topology: free cpumask cpus_to_visit
> >
> >     Free cpumask cpus_to_visit in case registering
> >     init_cpu_capacity_notifier has failed or the parsing of the cpu
> >     capacity-dmips-mhz property is done. The cpumask cpus_to_visit is
> >     only used inside the notifier call init_cpu_capacity_callback.
> >
> >     Reported-by: Vincent Guittot <vincent.guittot@linaro.org>
> >     Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
> 
> your proposal for freeing cpus_to_visit looks good for me
> 
> Acked-by: Vincent Guittot <vincent.guittot@linaro.org>
> 

Yep, looks good to me too. Thanks for fixing!

Best,

- Juri

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


Thread

[PATCH 2/6] drivers base/arch_topology: frequency-invariant load-tracking support Dietmar Eggemann <dietmar.eggemann@arm.com> - 2017-06-08 10:00 +0200
  Re: [PATCH 2/6] drivers base/arch_topology: frequency-invariant  load-tracking support Vincent Guittot <vincent.guittot@linaro.org> - 2017-06-12 16:30 +0200
    Re: [PATCH 2/6] drivers base/arch_topology: frequency-invariant  load-tracking support Dietmar Eggemann <dietmar.eggemann@arm.com> - 2017-06-14 10:00 +0200
      Re: [PATCH 2/6] drivers base/arch_topology: frequency-invariant  load-tracking support Vincent Guittot <vincent.guittot@linaro.org> - 2017-06-14 15:10 +0200
        Re: [PATCH 2/6] drivers base/arch_topology: frequency-invariant  load-tracking support Juri Lelli <juri.lelli@arm.com> - 2017-06-15 10:30 +0200

csiph-web