Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1181146
| Path | csiph.com!aioe.org!newsfeed.CARNet.hr!news.spin.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | "Rafael J. Wysocki" <rjw@rjwysocki.net> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V2] acpi-cpufreq: replace per_cpu with driver_data of policy |
| Date | Fri, 10 Jul 2015 03:00:02 +0200 |
| Message-ID | <pKuPw-7lp-9@gated-at.bofh.it> (permalink) |
| References | <pJAtZ-5H1-25@gated-at.bofh.it> <pK7pU-1br-19@gated-at.bofh.it> <pK8YF-2dt-5@gated-at.bofh.it> |
| X-Original-To | Pan Xinhui <xinhuix.pan@intel.com> |
| User-Agent | KMail/4.11.5 (Linux/4.1.0-rc5+; KDE/4.11.5; x86_64; ; ) |
| MIME-Version | 1.0 |
| Content-Transfer-Encoding | 8BIT |
| Content-Type | text/plain; charset="utf-8" |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 57 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Viresh Kumar <viresh.kumar@linaro.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, linux-pm@vger.kernel.org, "mnipxh@163.com" <mnipxh@163.com>, "yanmin_zhang@linux.intel.com" <yanmin_zhang@linux.intel.com> |
| X-Original-Date | Fri, 10 Jul 2015 03:16:49 +0200 |
| X-Original-Message-ID | <57468987.NPFzCAAv5k@vostro.rjw.lan> |
| X-Original-References | <559BC96E.8020804@intel.com> <12074796.mAD950pclu@vostro.rjw.lan> <559DCE3E.8050105@intel.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | aioe.org linux.kernel:1181146 |
Show key headers only | View raw
On Thursday, July 09, 2015 09:28:30 AM Pan Xinhui wrote: > hi, Rafael > thanks for your kind reply. :) > > On 2015年07月09日 08:20, Rafael J. Wysocki wrote: > > 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@intel.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@linaro.org> > > > > OK > > > > Does it fix any recent regressions or is it just an old bug? > > > > This patch achieve old bug fix and codes improvements. In past days, policy has no field *driver_data*, So > acpi-cpufreq driver has to use per_cpu to store some extra information. But it did not take good care of every scenarios. > Now cpufreq core makes awesome effort to store more per-policy information in policy. We can make use of this feature. So I > cook this patch. :) OK, patch applied, thanks! > I am preparing two patches for other two issues in acpi-cpufreq driver based on this patch. > I will fix them step by step. :) Thanks for doing that! Rafael -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH V2] acpi-cpufreq: replace per_cpu with driver_data of policy "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2015-07-09 02:00 +0200 Re: [PATCH V2] acpi-cpufreq: replace per_cpu with driver_data of policy "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2015-07-10 03:00 +0200
csiph-web