From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id MFTMEykxpGIzPQAAbAwnHQ (envelope-from ) for ; Sat, 11 Jun 2022 08:07:37 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id aJ7MEykxpGIGLQEA9RJhRA (envelope-from ) for ; Sat, 11 Jun 2022 08:07:37 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E03CAE3E3 for ; Sat, 11 Jun 2022 08:07:36 +0200 (CEST) Received: from localhost ([::1]:41844 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nzuHX-000170-VZ for larch@yhetil.org; Sat, 11 Jun 2022 02:07:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41994) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzu7K-0005vt-Qg for bug-guix@gnu.org; Sat, 11 Jun 2022 01:57:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:57828) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nzu7K-0001eT-FD for bug-guix@gnu.org; Sat, 11 Jun 2022 01:57:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nzu7K-0008Sy-F9 for bug-guix@gnu.org; Sat, 11 Jun 2022 01:57:02 -0400 Subject: bug#54783: ZRAM default priority wrong Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-To: bug-guix@gnu.org Resent-Date: Sat, 11 Jun 2022 05:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 54783 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Josselin Poiret Cc: 54783-done@debbugs.gnu.org, Stefan Baums Mail-Followup-To: 54783@debbugs.gnu.org, maxim.cournoyer@gmail.com, baums@stefanbaums.com Received: via spool by 54783-done@debbugs.gnu.org id=D54783.165492701032520 (code D ref 54783); Sat, 11 Jun 2022 05:57:02 +0000 Received: (at 54783-done) by debbugs.gnu.org; 11 Jun 2022 05:56:50 +0000 Received: from localhost ([127.0.0.1]:51723 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nzu78-0008SR-1f for submit@debbugs.gnu.org; Sat, 11 Jun 2022 01:56:50 -0400 Received: from mail-qv1-f46.google.com ([209.85.219.46]:47101) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nzu74-0008SC-Rt for 54783-done@debbugs.gnu.org; Sat, 11 Jun 2022 01:56:48 -0400 Received: by mail-qv1-f46.google.com with SMTP id i19so973568qvu.13 for <54783-done@debbugs.gnu.org>; Fri, 10 Jun 2022 22:56:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=C9KnPBeSRu/sPo44yUt0SV25DcHfHFCog6FDkxutMag=; b=mnLZ13L21HFj6JwlHlTOlXxNFFJ/OYTWB1OKjXICWD1uy/XYgG98PZGLrNmMlQiumy A+ayzb/gEaQNOjsDkwu6nYos6dE3RU6CWawUICAcsPKw2RiDY5XDti1WshU9yycukDC6 5DA8SKeXRWkEKSxcYqpvzgIVJF1o4V7TTH+5kldiqZFt4VRVdGNqSL4Nhkb1Dx34zrFo vL3od+ERC9448LBqvO3W71UluWZkLhKKOj+1k8KaGw3khXLDGJ027NkkRDJZnNKM4/ru VAI0ui5Tu3qVwx0jVyoNwizpqh3iTfJjeutlMUF482zNsgnpsESISl9QSaoe5KvJkeaJ SqnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=C9KnPBeSRu/sPo44yUt0SV25DcHfHFCog6FDkxutMag=; b=fyutPmF0TA2kcTRVQUuUhHOIyl9bZR4JOnrMuYTEkuq3Jx7E0b79Eam6I+mnvKT8Vh sM8GD2V00DKZ6heukxwfCFmrfi4AV6SYdas6mnGjMleB5hkwQAcJs2l7pdquwS5RfjGH MV57WVLBeoiI/UlD7ZdsFEPOECUY+sUOFzmB9h9IJKfOmzk9BjoHBSlDnS+hETlVPHWd Yv7nJ5gtUXwANi+XQ1SGNW496x38S7zUeQMGt3vkWbtdRf+sgEMsu8y6dUlZSxGRLtrE 0fmUNL0BMxzCjN3WjLiuM6dTcuGK5mOEQcXOtkpnXIfKdhiG6VadFloy0CKOmsF8uTnh nLWg== X-Gm-Message-State: AOAM533Akh4R6O51c9DkV0kvcglIfIGdnpgUropphwhS/7gER2j8h0O0 AkG/RpNujz0gLTtNumtfJMzPRd3mCxD7pw== X-Google-Smtp-Source: ABdhPJwsRwBiHscfyJUJlsocHo7PIACWM7k6zYhRPdKAqFGT7lCKmia7eGzfRz3w9zIhzx1l/elRGw== X-Received: by 2002:ad4:5447:0:b0:461:d7a7:f0ec with SMTP id h7-20020ad45447000000b00461d7a7f0ecmr91886351qvt.21.1654927000694; Fri, 10 Jun 2022 22:56:40 -0700 (PDT) Received: from hurd (dsl-155-254.b2b2c.ca. [66.158.155.254]) by smtp.gmail.com with ESMTPSA id s22-20020a05620a0bd600b006a73ad95d40sm1253558qki.55.2022.06.10.22.56.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jun 2022 22:56:39 -0700 (PDT) From: Maxim Cournoyer References: <878rsgfgxg.fsf@lmu.de> <87sfq6g96j.fsf@jpoiret.xyz> Date: Sat, 11 Jun 2022 01:56:38 -0400 In-Reply-To: <87sfq6g96j.fsf@jpoiret.xyz> (Josselin Poiret's message of "Thu, 21 Apr 2022 09:57:56 +0200") Message-ID: <878rq3g2uh.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1654927656; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-to:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=C9KnPBeSRu/sPo44yUt0SV25DcHfHFCog6FDkxutMag=; b=n5FS9J0hgS0SYCyErejFA0OjGZPUTPNWXtyLJFW8847d2f+y5KR5O8Ugwgar6B1VgHR0Vt NulXjGLvVxvs5TplCCfd3C6XAhKhz9kdW4BEwW7F/bSw9s8oeDv0tSM+r02Sj1IhrlNg4B iR5WR8ZiJaCGfzZa1lCpKWzEPQ5hGRqZRZthrg03dAWO5EqdSAPpmDL85VAqdjzmSKLC/Z YAWoiUv4Q/4O6u+yJ+U5w8KgbrtyguZF1/sEFt5SRQVbzr35bSHYslJYEVibGh0/3LBcWG HTPtF75bGCFHizS+UOsjIcuZQwuRDiH/8KTxTabmJlavyzRx9ReBZh/ZXmVTjQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1654927656; a=rsa-sha256; cv=none; b=OuX0awHYdgX8RYTJ1nGVWbc/6EkMDU0bq70t58gbQz+qqgqZdE9l5DXrZDU3lXE4Gj18Bd DSzYU3BSVj0eCjQOAgFXVv7gWYBFoHDgoHl3B7uAxXmyb2tLieTvSe7BbSUkwZ1kALLcMh PfKcfZej/eeCSbPItUvfhN3nj/aTOhqx/2GshH1cPi+4AiAAraT53bJnqAYRLakeS4jXRx 1vUUOncOFf91a9akWHjtr5WtpeJKJsLxGk0x2pY6svEJxurczWi50Z3xxeUTK2ZVSYRgLI hXfyrz5bV0f3XUhThw1sX/3kM9EM4a9XHnKkRQJb1X8FlkbBXOqlnGTXcLd0Lg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=mnLZ13L2; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 5.71 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=mnLZ13L2; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: E03CAE3E3 X-Spam-Score: 5.71 X-Migadu-Scanner: scn0.migadu.com X-TUID: 8wuaL5rDjMp4 Hi Josselin, [...] > > On the Guix side of things, we should really be using the same interface > as swap-space, as I think the distinction between #f and 0 to 32767 is > clearer. I'll send some patches that adress this soon, along with the > zram-service-type documentation. I've made this smallish change: --8<---------------cut here---------------start------------->8--- modified gnu/services/linux.scm @@ -296,14 +296,12 @@ (define (zram-device-configuration->udev-string config) "") "RUN+=\"/run/current-system/profile/sbin/mkswap /dev/zram0\" " "RUN+=\"/run/current-system/profile/sbin/swapon " - ;; XXX: The field is delayed while the deprecation warning remains in - ;; place, so we can't use match to fetch it (it would give a promise) - (if (zram-device-configuration-priority config) - (string-append "--priority " - (number->string - (zram-device-configuration-priority config)) - " ") - "") + ;; TODO: Revert to simply use 'priority' after removing the deprecation + ;; warning and the delayed property of the field. + (let ((priority* (force priority))) + (if priority* + (format #f "--priority ~a " priority*) + "")) "/dev/zram0\"\n")))) (define %zram-device-config --8<---------------cut here---------------end--------------->8--- Because the TODO comments seems more actionable for my future self, and pushed as a99015c878. Thanks Stefan for reporting the issue and for Josselin for fixing it! Closing. Maxim