* thermal: uevent/netlink with step_wise?
@ 2015-03-31 22:43 Brian Norris
2015-04-01 21:17 ` Brian Norris
0 siblings, 1 reply; 5+ messages in thread
From: Brian Norris @ 2015-03-31 22:43 UTC (permalink / raw)
To: linux-pm
Hi,
I'm a bit new to the thermal subsystem, but I'm trying to figure out how
best to use it. It seems quite flexible, but this flexibility means it's
not obvious what the best approach to using it should be.
Particularly, I'm looking right now at using the uevent/netlink
notification mechanism. It seems that this is only active when we use
the 'user_space' governor, meaning I can't get any user-space
notifications when using the in-kernel governor. Am I missing something,
or is this a known limitation? Is there any reason we can't enable both?
For the user-space side, I'd mostly be interested in being a consumer;
e.g., display warnings in high-temperature scenarios; although I might
also use it to trigger some user-space cooling mechanisms.
Also, can anyone point me at the best up-to-date documenation,
especially any overall design documents? Should I just be looking at
Documentation/thermal/, Documentation/devicetree/bindings/thermal/, and
example drivers?
Thanks in advance.
Brian
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: thermal: uevent/netlink with step_wise?
2015-03-31 22:43 thermal: uevent/netlink with step_wise? Brian Norris
@ 2015-04-01 21:17 ` Brian Norris
2015-04-02 4:28 ` R, Durgadoss
0 siblings, 1 reply; 5+ messages in thread
From: Brian Norris @ 2015-04-01 21:17 UTC (permalink / raw)
To: linux-pm; +Cc: R.Durgadoss, Len Brown, Lukasz Majewski, Eduardo Valentin
On Tue, Mar 31, 2015 at 03:43:48PM -0700, Brian Norris wrote:
> Particularly, I'm looking right now at using the uevent/netlink
> notification mechanism. It seems that this is only active when we use
> the 'user_space' governor, meaning I can't get any user-space
> notifications when using the in-kernel governor. Am I missing something,
> or is this a known limitation? Is there any reason we can't enable both?
> For the user-space side, I'd mostly be interested in being a consumer;
> e.g., display warnings in high-temperature scenarios; although I might
> also use it to trigger some user-space cooling mechanisms.
I'm noticing two additional interesting details.
1. There's a separate netlink event mechanism that has never been used.
See generate_netlink_event(), from this commit:
commit 4cb18728709683c91a5f6f8d5f337bfb498b089a
Author: R.Durgadoss <durgadoss.r@intel.com>
Date: Wed Oct 27 03:33:29 2010 +0530
thermal: Add event notification to thermal framework
2. The Samsung Exynos thermal driver reports uevent info directly, no
matter which governor is in use. See exynos_report_trigger(). Is it
acceptable to augment drivers in this way, or wouldn't it make more
sense to improve the core framework to support this type of
notification?
Brian
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: thermal: uevent/netlink with step_wise?
2015-04-01 21:17 ` Brian Norris
@ 2015-04-02 4:28 ` R, Durgadoss
2015-04-02 5:11 ` Brian Norris
0 siblings, 1 reply; 5+ messages in thread
From: R, Durgadoss @ 2015-04-02 4:28 UTC (permalink / raw)
To: Brian Norris, linux-pm@vger.kernel.org
Cc: Brown, Len, Lukasz Majewski, Eduardo Valentin, Zhang, Rui
>-----Original Message-----
>From: Brian Norris [mailto:computersforpeace@gmail.com]
>Sent: Thursday, April 2, 2015 2:47 AM
>To: linux-pm@vger.kernel.org
>Cc: R, Durgadoss; Brown, Len; Lukasz Majewski; Eduardo Valentin
>Subject: Re: thermal: uevent/netlink with step_wise?
>
>On Tue, Mar 31, 2015 at 03:43:48PM -0700, Brian Norris wrote:
>> Particularly, I'm looking right now at using the uevent/netlink
>> notification mechanism. It seems that this is only active when we use
>> the 'user_space' governor, meaning I can't get any user-space
>> notifications when using the in-kernel governor. Am I missing something,
>> or is this a known limitation? Is there any reason we can't enable both?
When we use an in-kernel governor, we expect that the governor takes care of
all the required throttling etc. Hence, we did not add notification for
in-kernel governors.
And we let the user space decide the actions when user space governor
is selected and this requires notification.
That said,
I do not think we have a hard rule saying we should not notify
User space in in kernel governors. I think you can add it in your
driver if you need it..
>> For the user-space side, I'd mostly be interested in being a consumer;
>> e.g., display warnings in high-temperature scenarios; although I might
>> also use it to trigger some user-space cooling mechanisms.
>
>I'm noticing two additional interesting details.
>
>1. There's a separate netlink event mechanism that has never been used.
>See generate_netlink_event(), from this commit:
>
>commit 4cb18728709683c91a5f6f8d5f337bfb498b089a
>Author: R.Durgadoss <durgadoss.r@intel.com>
>Date: Wed Oct 27 03:33:29 2010 +0530
>
> thermal: Add event notification to thermal framework
This netlink notification was added much before we had the
UEvent reporting. Once we had UEvent reporting, We even
discussed about removing this one. Afraid of breaking any
user space depending on this, we have not done that.
Thanks,
Durga
>
>2. The Samsung Exynos thermal driver reports uevent info directly, no
>matter which governor is in use. See exynos_report_trigger(). Is it
>acceptable to augment drivers in this way, or wouldn't it make more
>sense to improve the core framework to support this type of
>notification?
>
>Brian
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: thermal: uevent/netlink with step_wise?
2015-04-02 4:28 ` R, Durgadoss
@ 2015-04-02 5:11 ` Brian Norris
2015-04-02 5:28 ` R, Durgadoss
0 siblings, 1 reply; 5+ messages in thread
From: Brian Norris @ 2015-04-02 5:11 UTC (permalink / raw)
To: R, Durgadoss
Cc: linux-pm@vger.kernel.org, Brown, Len, Lukasz Majewski,
Eduardo Valentin, Zhang, Rui
Hi Durga,
On Thu, Apr 02, 2015 at 04:28:16AM +0000, R, Durgadoss wrote:
> >-----Original Message-----
> >From: Brian Norris [mailto:computersforpeace@gmail.com]
> >Sent: Thursday, April 2, 2015 2:47 AM
> >To: linux-pm@vger.kernel.org
> >Cc: R, Durgadoss; Brown, Len; Lukasz Majewski; Eduardo Valentin
> >Subject: Re: thermal: uevent/netlink with step_wise?
> >
> >On Tue, Mar 31, 2015 at 03:43:48PM -0700, Brian Norris wrote:
> >> Particularly, I'm looking right now at using the uevent/netlink
> >> notification mechanism. It seems that this is only active when we use
> >> the 'user_space' governor, meaning I can't get any user-space
> >> notifications when using the in-kernel governor. Am I missing something,
> >> or is this a known limitation? Is there any reason we can't enable both?
>
> When we use an in-kernel governor, we expect that the governor takes care of
> all the required throttling etc. Hence, we did not add notification for
> in-kernel governors.
>
> And we let the user space decide the actions when user space governor
> is selected and this requires notification.
OK, thanks for the explanation. I guess that matches my reading of the
code.
> That said,
> I do not think we have a hard rule saying we should not notify
> User space in in kernel governors. I think you can add it in your
> driver if you need it..
OK. I suppose I may do that if I decide I need that. But if I'm going to
be doing other general thermal management aspects from user space, I may
just defer entirely to user-space instead, and ignore the in-kernel
governor. I'm now trying to determine if there are many (any?) downsides
to that.
> >> For the user-space side, I'd mostly be interested in being a consumer;
> >> e.g., display warnings in high-temperature scenarios; although I might
> >> also use it to trigger some user-space cooling mechanisms.
> >
> >I'm noticing two additional interesting details.
> >
> >1. There's a separate netlink event mechanism that has never been used.
> >See generate_netlink_event(), from this commit:
> >
> >commit 4cb18728709683c91a5f6f8d5f337bfb498b089a
> >Author: R.Durgadoss <durgadoss.r@intel.com>
> >Date: Wed Oct 27 03:33:29 2010 +0530
> >
> > thermal: Add event notification to thermal framework
>
> This netlink notification was added much before we had the
> UEvent reporting.
Right, it looked that way.
> Once we had UEvent reporting, We even
> discussed about removing this one. Afraid of breaking any
> user space depending on this, we have not done that.
But no one calls this function, so how would it break user space? Or is
Intel maintaining a body of out-of-tree code that uses this?
Thanks for your comments.
Brian
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: thermal: uevent/netlink with step_wise?
2015-04-02 5:11 ` Brian Norris
@ 2015-04-02 5:28 ` R, Durgadoss
0 siblings, 0 replies; 5+ messages in thread
From: R, Durgadoss @ 2015-04-02 5:28 UTC (permalink / raw)
To: Brian Norris
Cc: linux-pm@vger.kernel.org, Brown, Len, Lukasz Majewski,
Eduardo Valentin, Zhang, Rui
>-----Original Message-----
>From: Brian Norris [mailto:computersforpeace@gmail.com]
>Sent: Thursday, April 2, 2015 10:41 AM
>To: R, Durgadoss
>Cc: linux-pm@vger.kernel.org; Brown, Len; Lukasz Majewski; Eduardo Valentin; Zhang, Rui
>Subject: Re: thermal: uevent/netlink with step_wise?
>
>Hi Durga,
>
>On Thu, Apr 02, 2015 at 04:28:16AM +0000, R, Durgadoss wrote:
>> >-----Original Message-----
>> >From: Brian Norris [mailto:computersforpeace@gmail.com]
>> >Sent: Thursday, April 2, 2015 2:47 AM
>> >To: linux-pm@vger.kernel.org
>> >Cc: R, Durgadoss; Brown, Len; Lukasz Majewski; Eduardo Valentin
>> >Subject: Re: thermal: uevent/netlink with step_wise?
>> >
>> >On Tue, Mar 31, 2015 at 03:43:48PM -0700, Brian Norris wrote:
>> >> Particularly, I'm looking right now at using the uevent/netlink
>> >> notification mechanism. It seems that this is only active when we use
>> >> the 'user_space' governor, meaning I can't get any user-space
>> >> notifications when using the in-kernel governor. Am I missing something,
>> >> or is this a known limitation? Is there any reason we can't enable both?
>>
>> When we use an in-kernel governor, we expect that the governor takes care of
>> all the required throttling etc. Hence, we did not add notification for
>> in-kernel governors.
>>
>> And we let the user space decide the actions when user space governor
>> is selected and this requires notification.
>
>OK, thanks for the explanation. I guess that matches my reading of the
>code.
>
>> That said,
>> I do not think we have a hard rule saying we should not notify
>> User space in in kernel governors. I think you can add it in your
>> driver if you need it..
>
>OK. I suppose I may do that if I decide I need that. But if I'm going to
>be doing other general thermal management aspects from user space, I may
>just defer entirely to user-space instead, and ignore the in-kernel
>governor. I'm now trying to determine if there are many (any?) downsides
>to that.
AFAIK, there are no downsides. You can very well do that..
Thanks,
Durga
>
>> >> For the user-space side, I'd mostly be interested in being a consumer;
>> >> e.g., display warnings in high-temperature scenarios; although I might
>> >> also use it to trigger some user-space cooling mechanisms.
>> >
>> >I'm noticing two additional interesting details.
>> >
>> >1. There's a separate netlink event mechanism that has never been used.
>> >See generate_netlink_event(), from this commit:
>> >
>> >commit 4cb18728709683c91a5f6f8d5f337bfb498b089a
>> >Author: R.Durgadoss <durgadoss.r@intel.com>
>> >Date: Wed Oct 27 03:33:29 2010 +0530
>> >
>> > thermal: Add event notification to thermal framework
>>
>> This netlink notification was added much before we had the
>> UEvent reporting.
>
>Right, it looked that way.
>
>> Once we had UEvent reporting, We even
>> discussed about removing this one. Afraid of breaking any
>> user space depending on this, we have not done that.
>
>But no one calls this function, so how would it break user space? Or is
>Intel maintaining a body of out-of-tree code that uses this?
>
>Thanks for your comments.
>
>Brian
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-04-02 5:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-31 22:43 thermal: uevent/netlink with step_wise? Brian Norris
2015-04-01 21:17 ` Brian Norris
2015-04-02 4:28 ` R, Durgadoss
2015-04-02 5:11 ` Brian Norris
2015-04-02 5:28 ` R, Durgadoss
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).