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,

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,

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

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 gre...@linuxfoundation.org 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

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 gre...@linuxfoundation.org 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 gre...@linuxfoundation.org wrote: On Tue,

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 gre...@linuxfoundation.org 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 gre...@linuxfoundation.org wrote: On Tue, Apr 02, 2013 at 09:48:18PM -0700, Jacob Pan wrote: Let's step

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 gre...@linuxfoundation.org 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 gre...@linuxfoundation.org wrote: On Tue,

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

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

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" > > > > >

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

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

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 gre...@linuxfoundation.org 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 gre...@linuxfoundation.org wrote:

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 explain what

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 gre...@linuxfoundation.org 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

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 gre...@linuxfoundation.org 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 gre...@linuxfoundation.org wrote: On Tue, Apr 02, 2013 at 04:33:57PM -0700, Jacob Pan wrote: On Tue, 2

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

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

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

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

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 > > +++

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

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

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

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.

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

[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

[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

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 extend

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. In

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 Average Power

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 to

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 the

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_rapl.c @@

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 gre...@linuxfoundation.org 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

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 gre...@linuxfoundation.org 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

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 gre...@linuxfoundation.org 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

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 gre...@linuxfoundation.org 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

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 gre...@linuxfoundation.org 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 gre...@linuxfoundation.org wrote: +#include intel_rapl.h +#include ../../../fs/sysfs/sysfs.h

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 gre...@linuxfoundation.org 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 gre...@linuxfoundation.org wrote: And, one final complaint, never use raw kobjects, for loads of good