lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 9 Sep 2009 23:27:52 +0200
From:	Pavel Machek <pavel@....cz>
To:	"Darrick J. Wong" <djwong@...ibm.com>
Cc:	akpm@...ux-foundation.org, mm-commits@...r.kernel.org,
	lenb@...nel.org, rui.zhang@...el.com,
	linux-kernel <linux-kernel@...r.kernel.org>,
	lm-sensors <lm-sensors@...sensors.org>
Subject: Re: [PATCH v3] hwmon driver for ACPI 4.0 power meters

On Wed 2009-09-09 11:20:51, Darrick J. Wong wrote:
> On Wed, Sep 09, 2009 at 10:06:38AM +0200, Pavel Machek wrote:
> 
> > > +Description
> > > +-----------
> > > +
> > > +This driver implements sensor reading support for the power meters exposed in
> > > +the ACPI 4.0 spec (Chapter 10.4).  These devices have a simple set of
> > > +features--a power meter that returns average power use over a configurable
> > > +interval, an optional capping mechanism, and a couple of trip points.
> > 
> > So where do we get the average power?
> 
> /sys/class/hwmon/hwmonX/device/powerX_average.  Most of the hwmon driver
> documentation assumes the reader has read the contents of
> Documentation/hwmon/sysfs-interface, but I suppose it wouldn't be too
> difficult to call that out explicitly.

Ok, I did not realize that hwmon/sysfs-interface applies here. Maybe
mention that? Copyring info is probably not good.

> > > +config ACPI_POWER_METER
> > > +	tristate "ACPI 4.0 power meter"
> > > +	depends on HWMON
> > > +	default m
> > 
> > default M is "evil".
> 
> I'll change it to Y, but I wonder why you think default M is evil...?

See the archives. Anyway it should be default to N -- it is new driver
and it is not essential in any way. "default Y" is for features that
were always in and are now optional.

> > > +	  devices.  Say Y (or M) if you have an Intel or AMD computer with
> > > +	  a power meter.
> > 
> > WTF? Neither Intel nor AMD makes _computers_.
> 
> I'll change that to "a computer with ACPI firmware."

I'd add that it only makes sense on very new computers.

> > > +	  To compile this driver as a module, choose M here:
> > > +	  the module will be called power-meter.
> > 
> > .ko.
> 
> The other config options in drivers/acpi/Kconfig omit the .ko; I was trying to
> be consistent with them.

Probably my fault, sorry.

> > > +#define POWER_CAP_NAME		"power1_cap"
> > 
> > I did not see power cap explained.
> 
> I'll add that, thanks for the continued review!

You are welcome.
									Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ