From: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>,
"Toralf Förster" <toralf.foerster@gmx.de>,
cpufreq@vger.kernel.org,
"Linux PM list" <linux-pm@vger.kernel.org>
Subject: Re: stable 3-10-3: strange output of "lsmod | grep ^acpi_cpufreq"
Date: Mon, 29 Jul 2013 15:14:08 +0530 [thread overview]
Message-ID: <51F63968.6060604@linux.vnet.ibm.com> (raw)
In-Reply-To: <CAOh2x=n0-a9amv5cfwOotvCnhNksnNZOSVp4jWk400z71UQeWQ@mail.gmail.com>
On 07/29/2013 01:21 PM, Viresh Kumar wrote:
> On Mon, Jul 29, 2013 at 4:50 AM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
>> Having a deeper look at it, though, I see that in fact the whole
>> cpufreq_cpu_put() is needed if the CPU is not the last one for the given
>> policy and is not needed at all otherwise (as described in the changelog
>> of the patch below).
>>
>> Srivatsa, does this make sense to you?
>
> It makes atleast to me :)
>
>> This is not the only bad thing that happens there, however, because
>> kobject_put() should only be called for the policy kobject at this
>> point if the CPU is not the last one for that policy.
>>
>> Namely, if the given CPU is the last one for that policy, the
>> policy kobject's refcount should be 1 at this point, as set by
>> cpufreq_add_dev_interface(), and only needs to be dropped once for
>> the kobject to go away. This actually happens under the cpu == 1
>> check, so it need not be done before by cpufreq_cpu_put().
>
> But I see one more issue with this code. For the last cpu we are just
> calling kobject_put() and not cpufreq_cpu_put() and hence call to
> module_put() is skipped. I am not sure, but that will probably cause
> a problem when we try to rmmod the module? But which module then?
> As we can't compile cpufreq.c as module.. So, is this part of code junk?
> And so can be removed?
>
I tried to address this concern in my other mail to Rafael. (Sorry I
forgot to CC you on that!). Let me know what you think of that solution.
Regards,
Srivatsa S. Bhat
next prev parent reply other threads:[~2013-07-29 9:44 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <51F40612.2050403@gmx.de>
2013-07-27 23:39 ` stable 3-10-3: strange output of "lsmod | grep ^acpi_cpufreq" Rafael J. Wysocki
2013-07-28 8:08 ` Toralf Förster
2013-07-28 8:08 ` Srivatsa S. Bhat
2013-07-28 10:21 ` Toralf Förster
2013-07-28 22:11 ` Rafael J. Wysocki
2013-07-28 22:43 ` Rafael J. Wysocki
2013-07-28 23:20 ` Rafael J. Wysocki
2013-07-29 7:51 ` Viresh Kumar
2013-07-29 9:44 ` Srivatsa S. Bhat [this message]
2013-07-29 9:41 ` Srivatsa S. Bhat
2013-07-29 11:22 ` Viresh Kumar
2013-07-29 11:54 ` Rafael J. Wysocki
2013-07-29 11:48 ` Srivatsa S. Bhat
2013-07-29 17:23 ` Toralf Förster
2013-07-29 20:19 ` Rafael J. Wysocki
2013-07-30 5:23 ` Viresh Kumar
2013-07-29 11:49 ` Rafael J. Wysocki
2013-07-29 11:44 ` Srivatsa S. Bhat
2013-07-29 12:04 ` Rafael J. Wysocki
2013-07-29 15:27 ` Srivatsa S. Bhat
2013-07-29 20:28 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51F63968.6060604@linux.vnet.ibm.com \
--to=srivatsa.bhat@linux.vnet.ibm.com \
--cc=cpufreq@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@sisk.pl \
--cc=toralf.foerster@gmx.de \
--cc=viresh.kumar@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox