Thread (29 messages) 29 messages, 3 authors, 2013-08-02

Re: [RFC][PATCH] cpufreq: Do not hold driver module references for additional policy CPUs

From: Srivatsa S. Bhat <hidden>
Date: 2013-08-01 19:05:10
Also in: lkml

On 08/02/2013 12:31 AM, Rafael J. Wysocki wrote:
On Thursday, August 01, 2013 11:36:49 PM Srivatsa S. Bhat wrote:
quoted
Its the cpufreq_cpu_get() hidden away in cpufreq_add_dev_symlink(). With
that taken care of, everything should be OK. Then we can change the
synchronization part to avoid using refcounts.
So I actually don't see why cpufreq_add_dev_symlink() needs to call
cpufreq_cpu_get() at all, since the policy refcount is already 1 at the
point it is called and the bumping up of the driver module refcount is
pointless.
Hmm, yes, it seems so.
However, if I change that I also need to change the piece of code that
calls the complementary cpufreq_cpu_put() and I kind of cannot find it.
... I guess that's because you are looking at the code with your patch
applied (and your patch removed that _put()) ;-)

Its this part in __cpufreq_remove_dev():

1303         } else {
1304 
1305                 if (!frozen) {
1306                         pr_debug("%s: removing link, cpu: %d\n", __func__, cpu);
1307                         cpufreq_cpu_put(data);
1308                 }
1309 

 
Regards,
Srivatsa S. Bhat
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help