From patchwork Sat Mar 12 22:12:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jelle Licht X-Patchwork-Id: 37764 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id BDB8427BBEA; Sat, 12 Mar 2022 22:13:10 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 8B5B027BBE9 for ; Sat, 12 Mar 2022 22:13:10 +0000 (GMT) Received: from localhost ([::1]:45092 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nT9z3-000289-Nm for patchwork@mira.cbaines.net; Sat, 12 Mar 2022 17:13:09 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46424) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nT9yx-00027r-5X for guix-patches@gnu.org; Sat, 12 Mar 2022 17:13:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:47130) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nT9yw-0005aV-NV for guix-patches@gnu.org; Sat, 12 Mar 2022 17:13:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nT9yw-0006kL-BU for guix-patches@gnu.org; Sat, 12 Mar 2022 17:13:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#54360] [PATCH] services: thermald: Add 'adaptive?' field. Resent-From: Jelle Licht Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 12 Mar 2022 22:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 54360 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54360@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.164712316925902 (code B ref -1); Sat, 12 Mar 2022 22:13:02 +0000 Received: (at submit) by debbugs.gnu.org; 12 Mar 2022 22:12:49 +0000 Received: from localhost ([127.0.0.1]:41027 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nT9yj-0006jg-3B for submit@debbugs.gnu.org; Sat, 12 Mar 2022 17:12:49 -0500 Received: from lists.gnu.org ([209.51.188.17]:35558) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nT9yh-0006jZ-NQ for submit@debbugs.gnu.org; Sat, 12 Mar 2022 17:12:47 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46392) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nT9yh-00027U-AP for guix-patches@gnu.org; Sat, 12 Mar 2022 17:12:47 -0500 Received: from mail1.fsfe.org ([217.69.89.151]:36188) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nT9yf-0005Z9-CI for guix-patches@gnu.org; Sat, 12 Mar 2022 17:12:47 -0500 From: Jelle Licht DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fsfe.org; s=2021100501; t=1647123159; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=1f103oQHxbdcErbAAtd11sGXyTP0zuTcmxzr9ZwNFWo=; b=l8U+M+vmC1QDBmiuhgv6pSEMJU186d7SSDPayKZo+Nv/UuRYTEXRtLOkusNA4lcwNdqbvG t3WtG+n9MEwW//tDJ0A0iGMQJ9Ok7XDL80rQGTE0qJ73thA8sJFxzPIysx6is6mGADetft UGFId1u7imha0kUT75R9VzFu4yyTvb8= Date: Sat, 12 Mar 2022 23:12:39 +0100 Message-Id: <711c688c39edd755893999a13fa336d58ad15391.1647123159.git.jlicht@fsfe.org> MIME-Version: 1.0 Received-SPF: pass client-ip=217.69.89.151; envelope-from=jlicht@fsfe.org; helo=mail1.fsfe.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/services/pm.scm (): Add 'adaptive?' field. (thermald-shepherd-service): Use it to pass --adaptive to thermald. * doc/guix.texi (Power Management Services): Document the 'adaptive?' field of 'thermald-configuration'. --- doc/guix.texi | 4 ++++ gnu/services/pm.scm | 5 +++++ 2 files changed, 9 insertions(+) base-commit: 504d15a593faf06ed502057406a20b3601e12759 diff --git a/doc/guix.texi b/doc/guix.texi index 4b71fb7010..82dce87eed 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -30687,6 +30687,10 @@ Power Management Services Data type representing the configuration of @code{thermald-service-type}. @table @asis +@item @code{adaptive?} (default: @code{#f}) +Use @acronym{DPTF, Dynamic Power and Thermal Framework} adaptive tables +when present. + @item @code{ignore-cpuid-check?} (default: @code{#f}) Ignore cpuid check for supported CPU models. diff --git a/gnu/services/pm.scm b/gnu/services/pm.scm index 3da3c0b961..e48236dbca 100644 --- a/gnu/services/pm.scm +++ b/gnu/services/pm.scm @@ -435,6 +435,8 @@ (define (generate-tlp-documentation) (define-record-type* thermald-configuration make-thermald-configuration thermald-configuration? + (adaptive? thermald-adaptive? ;boolean + (default #f)) (ignore-cpuid-check? thermald-ignore-cpuid-check? ;boolean (default #f)) (thermald thermald-thermald ;file-like @@ -448,6 +450,9 @@ (define (thermald-shepherd-service config) (start #~(make-forkexec-constructor '(#$(file-append (thermald-thermald config) "/sbin/thermald") "--no-daemon" + #$@(if (thermald-adaptive? config) + '("--adaptive") + '()) #$@(if (thermald-ignore-cpuid-check? config) '("--ignore-cpuid-check") '()))))