From: ludo@gnu.org (Ludovic Courtès)
To: Christopher Allan Webber <cwebber@dustycloud.org>
Cc: 26919@debbugs.gnu.org
Subject: bug#26919: [PATCH] Add thermald and thermald-service-type (for cpu frequency scaling)
Date: Sun, 14 May 2017 15:07:17 +0200 [thread overview]
Message-ID: <87bmqvy4ca.fsf@gnu.org> (raw)
In-Reply-To: <87y3u080qn.fsf@dustycloud.org> (Christopher Allan Webber's message of "Sun, 14 May 2017 00:29:36 -0500")
Hi!
Christopher Allan Webber <cwebber@dustycloud.org> skribis:
> Trying again, since last time I accidentally sent to bug-guix... oops.
>
> Hello! I got tired of my laptop crashing so much due to overheating, so
> here's a package for thermald as well as a service type.
Heheh. :-)
> From 56c7019d58d4a064fe44e626a1396b62cbf808b0 Mon Sep 17 00:00:00 2001
> From: Christopher Allan Webber <cwebber@dustycloud.org>
> Date: Sat, 13 May 2017 19:36:01 -0500
> Subject: [PATCH 1/2] gnu: Add thermald.
>
> * gnu/packages/admin.scm (thermald): New variable.
LGTM!
> From de2045cdc81ddef7b01b3445fb731a3252f5b4a8 Mon Sep 17 00:00:00 2001
> From: Christopher Allan Webber <cwebber@dustycloud.org>
> Date: Sat, 13 May 2017 19:37:02 -0500
> Subject: [PATCH 2/2] services: Add 'thermald-service-type'.
>
> * gnu/services/admin.scm (<thermald-configuration>): New record type.
> (thermald-shepherd-service, thermald-service-type): New variables.
> * doc/guix.texi (Thermal Management): New section documenting thermald.
[...]
> +@subsection Thermal Management
Would it make sense to move it under “Power Management Services” rather
than “Miscellaneous Services”?
> +The @code{(gnu services admin)} module provides an interface to
> +thermald, a cpu frequency scaling service which helps prevent overheating.
s/cpu/CPU/ :-)
> +@defvr {Scheme Variable} thermald-service-type
> +This is the service type for thermald.
What about something like this, to give more context:
… for @uref{https://01.org/linux-thermal-daemon/, thermald}, the Linux
Thermal Daemon, which is responsible for controlling the thermal state
of Intel processors and preventing overheating.
?
> +@deftp {Data Type} thermald-configuration
> +Data type representing the configuration of THERMALD-SERVICE.
s/THERMALD-SERVICE/@code{thermald-service-type}/
> +(define-record-type* <thermald-configuration>
> + thermald-configuration make-thermald-configuration
> + thermald-configuration?
> + (ignore-cpuid-check? thermald-ignore-cpuid-check?
> + (default #f)))
Could you add a ‘thermald’ field, defaulting to ‘thermald’ (the package)…
> +(define (thermald-shepherd-service config)
> + (list
> + (shepherd-service
> + (provision '(thermald))
> + (documentation "Run thermald cpu frequency scaling.")
> + (start #~(make-forkexec-constructor
> + '(#$(file-append thermald "/sbin/thermald")
… and honor it here, and add it to guix.texi?
OK with these changes, thank you!
Do you think it’s something we should add to ‘%base-services’, or is it
too hardware-dependent?
Ludo’.
next prev parent reply other threads:[~2017-05-14 13:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-14 5:29 bug#26919: [PATCH] Add thermald and thermald-service-type (for cpu frequency scaling) Christopher Allan Webber
2017-05-14 13:07 ` Ludovic Courtès [this message]
2017-05-14 15:49 ` Christopher Allan Webber
2017-05-14 17:00 ` Leo Famulari
2017-05-14 19:55 ` Ludovic Courtès
2017-05-14 23:56 ` Christopher Allan Webber
2017-05-15 7:46 ` Ludovic Courtès
2017-05-30 16:00 ` Ludovic Courtès
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bmqvy4ca.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=26919@debbugs.gnu.org \
--cc=cwebber@dustycloud.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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).