Re: [PATCH 1/1] Introduce Intel RAPL cooling device driver

2013-04-05 Thread Greg KH
On Fri, Apr 05, 2013 at 02:33:40PM -0700, Jacob Pan wrote: > On Fri, 5 Apr 2013 13:23:09 -0700 > Greg KH wrote: > > > On Wed, Apr 03, 2013 at 10:35:51AM -0700, Jacob Pan wrote: > > > On Wed, 3 Apr 2013 09:35:09 -0700 > > > Greg KH wrote: > > > > > > > On Tue, Apr 02, 2013 at 09:48:18PM -0700, J

Re: [PATCH 1/1] Introduce Intel RAPL cooling device driver

2013-04-05 Thread Jacob Pan
On Fri, 5 Apr 2013 13:23:09 -0700 Greg KH wrote: > On Wed, Apr 03, 2013 at 10:35:51AM -0700, Jacob Pan wrote: > > On Wed, 3 Apr 2013 09:35:09 -0700 > > Greg KH wrote: > > > > > On Tue, Apr 02, 2013 at 09:48:18PM -0700, Jacob Pan wrote: > > > > > Let's step back and start over, what exactly are

Re: [PATCH 1/1] Introduce Intel RAPL cooling device driver

2013-04-05 Thread Greg KH
On Wed, Apr 03, 2013 at 11:03:08AM -0700, Jacob Pan wrote: > On Wed, 3 Apr 2013 09:30:52 -0700 > Greg KH wrote: > > > On Tue, Apr 02, 2013 at 05:17:14PM -0700, Jacob Pan wrote: > > > On Tue, 2 Apr 2013 16:48:05 -0700 > > > Greg KH wrote: > > > > > > > On Tue, Apr 02, 2013 at 04:33:57PM -0700, J

Re: [PATCH 1/1] Introduce Intel RAPL cooling device driver

2013-04-05 Thread Greg KH
On Wed, Apr 03, 2013 at 10:35:51AM -0700, Jacob Pan wrote: > On Wed, 3 Apr 2013 09:35:09 -0700 > Greg KH wrote: > > > On Tue, Apr 02, 2013 at 09:48:18PM -0700, Jacob Pan wrote: > > > > Let's step back and start over, what exactly are you trying to > > > > tell userspace? What data do you have th

Re: [PATCH 1/1] Introduce Intel RAPL cooling device driver

2013-04-03 Thread Jacob Pan
On Wed, 3 Apr 2013 09:30:52 -0700 Greg KH wrote: > On Tue, Apr 02, 2013 at 05:17:14PM -0700, Jacob Pan wrote: > > On Tue, 2 Apr 2013 16:48:05 -0700 > > Greg KH wrote: > > > > > On Tue, Apr 02, 2013 at 04:33:57PM -0700, Jacob Pan wrote: > > > > On Tue, 2 Apr 2013 16:00:42 -0700 > > > > Greg KH

Re: [PATCH 1/1] Introduce Intel RAPL cooling device driver

2013-04-03 Thread Jacob Pan
On Wed, 3 Apr 2013 09:35:09 -0700 Greg KH wrote: > On Tue, Apr 02, 2013 at 09:48:18PM -0700, Jacob Pan wrote: > > > Let's step back and start over, what exactly are you trying to > > > tell userspace? What data do you have that you need to express > > > to it? How do you want userspace to see/u

Re: [PATCH 1/1] Introduce Intel RAPL cooling device driver

2013-04-03 Thread Greg KH
On Tue, Apr 02, 2013 at 09:48:18PM -0700, Jacob Pan wrote: > > Let's step back and start over, what exactly are you trying to tell > > userspace? What data do you have that you need to express to it? How > > do you want userspace to see/use it? > > It is a good idea to step back and let me expla

Re: [PATCH 1/1] Introduce Intel RAPL cooling device driver

2013-04-03 Thread Greg KH
On Tue, Apr 02, 2013 at 05:17:14PM -0700, Jacob Pan wrote: > On Tue, 2 Apr 2013 16:48:05 -0700 > Greg KH wrote: > > > On Tue, Apr 02, 2013 at 04:33:57PM -0700, Jacob Pan wrote: > > > On Tue, 2 Apr 2013 16:00:42 -0700 > > > Greg KH wrote: > > > > > > > > +#include "intel_rapl.h" > > > > > +#incl

Re: [PATCH 1/1] Introduce Intel RAPL cooling device driver

2013-04-03 Thread Paul Bolle
On Tue, 2013-04-02 at 15:15 -0700, Jacob Pan wrote: > --- a/drivers/platform/x86/Kconfig > +++ b/drivers/platform/x86/Kconfig > @@ -781,4 +781,12 @@ config APPLE_GMUX > graphics as well as the backlight. Currently only backlight > control is supported by the driver. > > +config IN

Re: [PATCH 1/1] Introduce Intel RAPL cooling device driver

2013-04-02 Thread Jacob Pan
On Tue, 2 Apr 2013 17:13:00 -0700 Greg KH wrote: > On Tue, Apr 02, 2013 at 04:53:40PM -0700, Jacob Pan wrote: > > On Tue, 2 Apr 2013 16:00:42 -0700 > > Greg KH wrote: > > > > > And, one final complaint, never use "raw" kobjects, for loads of > > > good reasons, not the least being you just prev

Re: [PATCH 1/1] Introduce Intel RAPL cooling device driver

2013-04-02 Thread Jacob Pan
On Tue, 2 Apr 2013 16:48:05 -0700 Greg KH wrote: > On Tue, Apr 02, 2013 at 04:33:57PM -0700, Jacob Pan wrote: > > On Tue, 2 Apr 2013 16:00:42 -0700 > > Greg KH wrote: > > > > > > +#include "intel_rapl.h" > > > > +#include "../../../fs/sysfs/sysfs.h" > > > > > > WTF? > > > > > > Oh, that's a

Re: [PATCH 1/1] Introduce Intel RAPL cooling device driver

2013-04-02 Thread Greg KH
On Tue, Apr 02, 2013 at 04:53:40PM -0700, Jacob Pan wrote: > On Tue, 2 Apr 2013 16:00:42 -0700 > Greg KH wrote: > > > And, one final complaint, never use "raw" kobjects, for loads of good > > reasons, not the least being you just prevented userspace from seeing > > what is happening with your dev

Re: [PATCH 1/1] Introduce Intel RAPL cooling device driver

2013-04-02 Thread Jacob Pan
On Tue, 2 Apr 2013 16:00:42 -0700 Greg KH wrote: > And, one final complaint, never use "raw" kobjects, for loads of good > reasons, not the least being you just prevented userspace from seeing > what is happening with your devices. Use the driver model, that's > what it is there for, if you need

Re: [PATCH 1/1] Introduce Intel RAPL cooling device driver

2013-04-02 Thread Greg KH
On Tue, Apr 02, 2013 at 04:33:57PM -0700, Jacob Pan wrote: > On Tue, 2 Apr 2013 16:00:42 -0700 > Greg KH wrote: > > > > +#include "intel_rapl.h" > > > +#include "../../../fs/sysfs/sysfs.h" > > > > WTF? > > > > Oh, that's a sure sign you are not doing something properly, if you > > think it's

Re: [PATCH 1/1] Introduce Intel RAPL cooling device driver

2013-04-02 Thread Jacob Pan
On Tue, 2 Apr 2013 16:00:42 -0700 Greg KH wrote: > > +#include "intel_rapl.h" > > +#include "../../../fs/sysfs/sysfs.h" > > WTF? > > Oh, that's a sure sign you are not doing something properly, if you > think it's ok to muck around with the internals of sysfs. > > There's a reason that file

Re: [PATCH 1/1] Introduce Intel RAPL cooling device driver

2013-04-02 Thread Greg Kroah-Hartman
On Tue, Apr 02, 2013 at 02:47:35PM -0700, Randy Dunlap wrote: > On 04/02/13 15:15, Jacob Pan wrote: > > diff --git a/drivers/platform/x86/intel_rapl.c > > b/drivers/platform/x86/intel_rapl.c > > new file mode 100644 > > index 000..56ee928 > > --- /dev/null > > +++ b/drivers/platform/x86/intel_

Re: [PATCH 1/1] Introduce Intel RAPL cooling device driver

2013-04-02 Thread Greg KH
On Tue, Apr 02, 2013 at 04:00:42PM -0700, Greg KH wrote: > I'm not even going to review the rest of this file, please fix that up > first, before sending it out again. And, when you do so, please cc: me. It's like a train wreck, you just can't tear away your eyes... You race with userspace in th

Re: [PATCH 1/1] Introduce Intel RAPL cooling device driver

2013-04-02 Thread Greg KH
On Tue, Apr 02, 2013 at 03:15:36PM -0700, Jacob Pan wrote: > RAPL(Running Average Power Limit) interface provides platform software > with the ability to monitor, control, and get notifications on SOC > power consumptions. Since its first appearance on Sandy Bridge, more > features have being added

Re: [PATCH 1/1] Introduce Intel RAPL cooling device driver

2013-04-02 Thread Randy Dunlap
On 04/02/13 15:15, Jacob Pan wrote: > diff --git a/drivers/platform/x86/intel_rapl.c > b/drivers/platform/x86/intel_rapl.c > new file mode 100644 > index 000..56ee928 > --- /dev/null > +++ b/drivers/platform/x86/intel_rapl.c > @@ -0,0 +1,1323 @@ > +/* > + * intel_rapl.c - Intel Running Averag

Re: [PATCH 1/1] Introduce Intel RAPL cooling device driver

2013-04-02 Thread Randy Dunlap
On 04/02/13 15:15, Jacob Pan wrote: > RAPL(Running Average Power Limit) interface provides platform software > with the ability to monitor, control, and get notifications on SOC > power consumptions. Since its first appearance on Sandy Bridge, more > features have being added to extend its usage. I

Re: [PATCH 1/1] Introduce Intel RAPL cooling device driver

2013-04-02 Thread Joe Perches
On Tue, 2013-04-02 at 15:15 -0700, Jacob Pan wrote: > RAPL(Running Average Power Limit) interface provides platform software > with the ability to monitor, control, and get notifications on SOC > power consumptions. Since its first appearance on Sandy Bridge, more > features have being added to ext

[PATCH 1/1] Introduce Intel RAPL cooling device driver

2013-04-02 Thread Jacob Pan
RAPL(Running Average Power Limit) interface provides platform software with the ability to monitor, control, and get notifications on SOC power consumptions. Since its first appearance on Sandy Bridge, more features have being added to extend its usage. In RAPL, platforms are divided into domains f