From: Jean Delvare <khali@linux-fr.org>
To: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: Len Brown <len.brown@intel.com>,
LKML <linux-kernel@vger.kernel.org>,
Rene Herman <rene.herman@gmail.com>
Subject: Re: [PATCH v2 3/3] thermal: Make THERMAL_HWMON implementation fully internal
Date: Tue, 26 Apr 2011 18:29:05 +0200 [thread overview]
Message-ID: <20110426182905.72bbf7b6@endymion.delvare> (raw)
In-Reply-To: <20110426155212.GB18176@ericsson.com>
On Tue, 26 Apr 2011 08:52:12 -0700, Guenter Roeck wrote:
> On Tue, Apr 26, 2011 at 11:04:07AM -0400, Jean Delvare wrote:
> > THERMAL_HWMON is implemented inside the thermal_sys driver and has no
> > effect on drivers implementing thermal zones, so they shouldn't see
> > anything related to it in <linux/thermal.h>. Making the THERMAL_HWMON
> > implementation fully internal has two advantages beyond the cleaner
> > design:
> > * This avoids rebuilding all thermal drivers if the THERMAL_HWMON
> > implementation changes, or if CONFIG_THERMAL_HWMON gets enabled or
> > disabled.
> > * This avoids breaking the thermal kABI in these cases too, which
> > should make distributions happy.
> >
> > The only drawback I can see is slightly higher memory fragmentation,
> > as the number of kzalloc() calls will increase by one per thermal zone.
> > But I doubt it will be a problem in practice, as I've never seen a
> > system with more than two thermal zones.
> >
> > Signed-off-by: Jean Delvare <khali@linux-fr.org>
> > Cc: Rene Herman <rene.herman@gmail.com>
> > Cc: Len Brown <len.brown@intel.com>
> > Cc: Guenter Roeck <guenter.roeck@ericsson.com>
> > ---
> > * If memory fragmentation is really a concern to anyone, it would be
> > possible to save one kalloc for the first temperature input of each
> > zone type, as the price of slightly more complex code.
> >
> > * Removal code path is untested, as I have never been able to unload
> > the thermal_sys module on any of my systems. Something is pinning it
> > and I have no idea what it is.
> >
> Doesn't lsmod show the culprit ?
No, it's not a module dependency. The reference counter is set to 1,
so somewhere in the kernel something is taking a reference to the
module and won't release it. I wish this was better instrumented so
that it would be possible to know who is doing that.
> Otherwise
>
> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Thanks for the reviews.
--
Jean Delvare
next prev parent reply other threads:[~2011-04-26 16:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-26 14:56 [PATCH v2 0/3] thermal: Cleanups Jean Delvare
2011-04-26 15:02 ` [PATCH v2 1/3] thermal: Hide CONFIG_THERMAL_HWMON Jean Delvare
2011-04-26 15:52 ` Guenter Roeck
2011-04-26 15:02 ` [PATCH v2 2/3] thermal: Split hwmon lookup to a separate function Jean Delvare
2011-04-26 15:53 ` Guenter Roeck
2011-04-26 15:04 ` [PATCH v2 3/3] thermal: Make THERMAL_HWMON implementation fully internal Jean Delvare
2011-04-26 15:52 ` Guenter Roeck
2011-04-26 16:29 ` Jean Delvare [this message]
2011-04-26 17:43 ` Guenter Roeck
2011-04-26 19:39 ` Jean Delvare
2011-04-26 21:00 ` Guenter Roeck
2011-04-27 11:59 ` Jean Delvare
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=20110426182905.72bbf7b6@endymion.delvare \
--to=khali@linux-fr.org \
--cc=guenter.roeck@ericsson.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rene.herman@gmail.com \
/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
Powered by JetHome