From: Matt Longnecker <mlongnecker-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
To: Srikar Srimath Tirumala
<srikars-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
edubezval-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
rui.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
srinivas.pandruvada-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v3 1/4] thermal: send notifications for cdev state change
Date: Wed, 30 Mar 2016 09:45:20 -0700 [thread overview]
Message-ID: <56FC02A0.7040503@nvidia.com> (raw)
In-Reply-To: <1459298497-29481-2-git-send-email-srikars-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Looks good to me.
The only platforms I've ever seen with substantial numbers of cooling
devices whose states change relatively frequently are NVIDIA's. So I
don't think this will be a performance concern.
-Matt Longnecker
On 03/29/2016 05:41 PM, Srikar Srimath Tirumala wrote:
> Send notifications using sysfs_notify to indicate that a cooling
> device cur state has changed. This can alert the listeners that
> hardware clocks are about to be throttled.
>
> A listening user space application can use this notification to
> perform workload throttling.
>
> Change-Id: I71cd6d11bff87f181fa3b7db36bf6c953d1d77eb
> Signed-off-by: Srikar Srimath Tirumala <srikars-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> ---
> drivers/thermal/thermal_core.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
> index d4b5465..b09fff1 100644
> --- a/drivers/thermal/thermal_core.c
> +++ b/drivers/thermal/thermal_core.c
> @@ -1642,6 +1642,7 @@ void thermal_cdev_update(struct thermal_cooling_device *cdev)
> cdev->updated = true;
> trace_cdev_update(cdev, target);
> dev_dbg(&cdev->device, "set to state %lu\n", target);
> + sysfs_notify(&cdev->device.kobj, NULL, "cur_state");
> }
> EXPORT_SYMBOL(thermal_cdev_update);
>
next prev parent reply other threads:[~2016-03-30 16:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-30 0:41 [PATCH v3 0/4] add sysfs_notify on some attributes Srikar Srimath Tirumala
[not found] ` <1459298497-29481-1-git-send-email-srikars-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-03-30 0:41 ` [PATCH v3 1/4] thermal: send notifications for cdev state change Srikar Srimath Tirumala
[not found] ` <1459298497-29481-2-git-send-email-srikars-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-03-30 16:45 ` Matt Longnecker [this message]
2016-03-30 0:41 ` [PATCH v3 3/4] thermal: of: enable temperature notifications Srikar Srimath Tirumala
2016-03-30 16:54 ` Matt Longnecker
[not found] ` <1459298497-29481-4-git-send-email-srikars-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-05-03 3:26 ` Eduardo Valentin
2016-03-30 0:41 ` [PATCH v3 4/4] thermal: update documentation for new device ops Srikar Srimath Tirumala
[not found] ` <1459298497-29481-5-git-send-email-srikars-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-03-30 16:54 ` Matt Longnecker
2016-05-03 3:27 ` Eduardo Valentin
2016-03-30 0:41 ` [PATCH v3 2/4] thermal: send notifications for tz temperature Srikar Srimath Tirumala
[not found] ` <1459298497-29481-3-git-send-email-srikars-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-03-30 16:43 ` Matt Longnecker
2016-03-30 16:53 ` Matt Longnecker
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=56FC02A0.7040503@nvidia.com \
--to=mlongnecker-ddmlm1+adcrqt0dzr+alfa@public.gmane.org \
--cc=edubezval-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=rui.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=srikars-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=srinivas.pandruvada-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
/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;
as well as URLs for NNTP newsgroup(s).