[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <12074796.mAD950pclu@vostro.rjw.lan>
Date: Thu, 09 Jul 2015 02:20:56 +0200
From: "Rafael J. Wysocki" <rjw@...ysocki.net>
To: Viresh Kumar <viresh.kumar@...aro.org>
Cc: Pan Xinhui <xinhuix.pan@...el.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
linux-pm@...r.kernel.org, "mnipxh@....com" <mnipxh@....com>,
"yanmin_zhang@...ux.intel.com" <yanmin_zhang@...ux.intel.com>
Subject: Re: [PATCH V2] acpi-cpufreq: replace per_cpu with driver_data of policy
On Tuesday, July 07, 2015 08:04:43 PM Viresh Kumar wrote:
> On 07-07-15, 20:43, Pan Xinhui wrote:
> >
> > Drivers can store their internal per-policy information in
> > policy->driver_data, lets use it.
> >
> > we have benefits after this replacing.
> > 1) memory saving.
> > 2) policy is shared by several cpus, per_cpu seems not correct. using
> > *driver_data* is more reasonable.
> > 3) fix a memory leak in acpi_cpufreq_cpu_exit. as policy->cpu might
> > change during cpu hotplug. So sometimes we cant't free *data*, use
> > *driver_data* to fix it.
> > 4) fix a zero return value of get_cur_freq_on_cpu. Only per_cpu of
> > policy->cpu is set to *data*, if we try to get cpufreq on other cpus, we
> > get zero instead of correct values. Use *driver_data* to fix it.
> >
> > Signed-off-by: Pan Xinhui <xinhuix.pan@...el.com>
> > ---
> > Changes from V1:
> > codes style fix, comments update
> > move cpufreq_cpu_put(policy) after we get *driver_data*
> > ---
> > drivers/cpufreq/acpi-cpufreq.c | 40 ++++++++++++++++++++++------------------
> > 1 file changed, 22 insertions(+), 18 deletions(-)
>
> Acked-by: Viresh Kumar <viresh.kumar@...aro.org>
OK
Does it fix any recent regressions or is it just an old bug?
Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists