From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id GHeNLm96rGFtKQEAgWs5BA (envelope-from ) for ; Sun, 05 Dec 2021 09:38:07 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 86oHKm96rGGNVAAAbx9fmQ (envelope-from ) for ; Sun, 05 Dec 2021 08:38:07 +0000 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 84991BA4D for ; Sun, 5 Dec 2021 09:38:07 +0100 (CET) Received: from localhost ([::1]:38498 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mtn25-0007Dh-Mm for larch@yhetil.org; Sun, 05 Dec 2021 03:38:05 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33106) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mtn22-0007DY-A7 for guix-patches@gnu.org; Sun, 05 Dec 2021 03:38:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:44723) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mtn22-000679-2x for guix-patches@gnu.org; Sun, 05 Dec 2021 03:38:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mtn22-0001kz-0b for guix-patches@gnu.org; Sun, 05 Dec 2021 03:38:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52283] [PATCH 00/10] Tuning packages for CPU micro-architectures Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 05 Dec 2021 08:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52283 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 52283@debbugs.gnu.org Received: via spool by 52283-submit@debbugs.gnu.org id=B52283.16386934396698 (code B ref 52283); Sun, 05 Dec 2021 08:38:01 +0000 Received: (at 52283) by debbugs.gnu.org; 5 Dec 2021 08:37:19 +0000 Received: from localhost ([127.0.0.1]:56269 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtn1K-0001jy-Tr for submit@debbugs.gnu.org; Sun, 05 Dec 2021 03:37:19 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60382) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtn1J-0001jm-Iw for 52283@debbugs.gnu.org; Sun, 05 Dec 2021 03:37:18 -0500 Received: from [2001:470:142:3::e] (port=33700 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mtn1D-00063E-R2; Sun, 05 Dec 2021 03:37:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=ww+cou7AhLJFlKZmzEHTYloDPFrBoCWD40s+ERAkZ2s=; b=KRLd85eR2YBLqoBg3HW+ xighOqPfG09S/UsQAoE8S/KpGRUIgXnQty+M2JhK4LXOpl2B0B+N0/kIbI3ndrV1825tEg0f0cCG1 rTJ64LNTBn42f8BpLQoD/UWiMz9XZ9NDGMHrEqiWDTbVTr/c6ethBaj2z5Hw/Cz7fly9PHrjIuIOL ADmcZp9sOliecW+AeMFQJjEk8/84rCfx3J9f+bXqhOzHqywNGy8upwf1yoLKrHo5IXz7ShDqLCH84 F0e0w8ZbKAj5gYGzlzT9U0IGBOyKxghmIgK+Gpu8xKyjGjJIqTTD8a2AXeqPnNRDM6JcG+iTUgM9v plunRaXRXXDWkg==; Received: from [2a01:e0a:19b:d9a0:2ddb:d3d2:32e8:d31a] (port=48894 helo=meije) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mtn1D-0003EX-Eu; Sun, 05 Dec 2021 03:37:11 -0500 From: Mathieu Othacehe References: <20211204203447.15200-1-ludo@gnu.org> <20211204204924.15581-1-ludo@gnu.org> Date: Sun, 05 Dec 2021 09:37:09 +0100 In-Reply-To: <20211204204924.15581-1-ludo@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Sat, 4 Dec 2021 21:49:15 +0100") Message-ID: <87czmb1m8a.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (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: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1638693487; 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-cc: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=ww+cou7AhLJFlKZmzEHTYloDPFrBoCWD40s+ERAkZ2s=; b=WTxYG2FJxyTTcYhkCG9JHgWj4z8PbyQ02lu+mhRXB/s5br3te3+B7L8/nFRoSPvONryNql uJCFk+a6TXFlDjz98osfloO/hEHs3MLzXYs+qcGnLP/lLOpthwEs3z/Q7DCSsWYCyBcGxN 4C6QFLSC7xlhsv5jeByjlKO2iFyAYzC2gxA5W02SRfrNeF2YQ7IeTcDhIjaKl776ftgf00 3J4CfZuqdCgUy0Z62i+WEUGBCZz6LwfDhcLYqbG5wAO4KEUtiLDUsYUPwCUthDBqnlsu8G Quc4t362eMlN7QGNMqNEW+vOBAKweZ3F1nOBexToP0/0wrmTLEUlEwXGvJHApw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1638693487; a=rsa-sha256; cv=none; b=nJ511LDGTT5478LDIqTF/A/iPCV+kCSkyf+ZNivus+xqkaneWjnwuH8ACmY/cCN0Txq3D7 KuTyg7jdFDLnl+IuwUbYCLaNtiNJbnahxPniXy/xud1qoJluPX9pQAZAUlMMaFPAkWHvBK gG9YFs4WmgNR9bbVOqwBGkUMAErkeUGNnPEk/B98hcFe31DYyn1RDngeT6NCjzm+S2jeDk k5kJDGoa19oDYvVLqIkhyvp6g/zHY5PJSJkU8Lv0h+V4YrSdA9VnoxeIgQso/4hbknl+bL lZVMIoWjXOSb6l1gAfMprxnY/9No6RaEha80Kq2DbGzqw17Uj0vzt2UJINg04w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=KRLd85eR; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.63 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=KRLd85eR; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 84991BA4D X-Spam-Score: -3.63 X-Migadu-Scanner: scn0.migadu.com X-TUID: p6TQ42KBKPbt Hey Ludo, Wooh, nice addition! > +(define-record-type > + (cpu architecture family model flags) > + cpu? > + (architecture cpu-architecture) ;string, from 'uname' > + (family cpu-family) ;integer > + (model cpu-model) ;integer > + (flags cpu-flags)) ;set of strings When using the "--tune" transformation option with "native", we can expect the current-cpu method to fill the record correctly. However, when the user is passing a custom cpu name, it might be incorrect. I think we should check the user input against a list of valid/supported cpu architectures. That's something we should also enforce for the system and target fields. Currently, this command "guix build -s arch64-linux hello" is failing with an unpleasant backtrace, while it could warn that the given system is not supported. Maybe the (guix cpu) and (gnu platform) modules should be merged somehow to define the supported CPU micro-architectures: --8<---------------cut here---------------start------------->8--- (define armv7-linux (platform (target "arm-linux-gnueabihf") (system "armhf-linux") (linux-architecture "arm") (supported-march '("armv7" "armv7-a" "armv7ve")) --8<---------------cut here---------------end--------------->8--- we could then use those platform records in the (gnu ci) module to build packages against all the supported micro architectures and remove the "%x86-64-micro-architecture" variable you propose to introduce there. WDYT? Thanks, Mathieu