From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 28 04:10:03 2023 Received: (at submit) by debbugs.gnu.org; 28 Nov 2023 09:10:03 +0000 Received: from localhost ([127.0.0.1]:45398 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r7u6U-0007Yt-GI for submit@debbugs.gnu.org; Tue, 28 Nov 2023 04:10:02 -0500 Received: from lists.gnu.org ([2001:470:142::17]:44416) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r7u6S-0007YK-21 for submit@debbugs.gnu.org; Tue, 28 Nov 2023 04:10:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r7u6F-0004La-Pm for bug-guix@gnu.org; Tue, 28 Nov 2023 04:09:47 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r7u6D-0005oM-GM for bug-guix@gnu.org; Tue, 28 Nov 2023 04:09:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=PQk1a7G9jGmnOoX73RFcr7aSSMicDJcFsuhyg8hfr8A=; b=vsNGxLcFFwtSDpYx7w/sjwdxVk2Pe3pfPLQW4nDqX0TSJl/7QbQxVAhc ftk7xZgVcGF9zW3J/t50/Ja3D8YiOTtfuFi+tYaHMVmAc0VD4iwyEyep6 wvzCPAWSaDC8oswPADxXQKDp8OzklWv5QTvARvuMmtz4vMAQ7ZgIXktZH I=; Authentication-Results: mail3-relais-sop.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=ludovic.courtes@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="6.04,233,1695679200"; d="scan'208";a="72783190" Received: from unknown (HELO ribbon) ([193.50.110.222]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Nov 2023 10:09:43 +0100 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: bug-guix@gnu.org Subject: [Cuirass] =?utf-8?Q?=E2=80=98cuirass_remote-worker=E2=80=99?= gets the CPU count wrong on the OverDrive X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Octidi 8 Frimaire an 232 de la =?utf-8?Q?R=C3=A9volu?= =?utf-8?Q?tion=2C?= jour du Miel X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 28 Nov 2023 10:09:42 +0100 Message-ID: <87zfyyutux.fsf@inria.fr> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=192.134.164.104; envelope-from=ludovic.courtes@inria.fr; helo=mail3-relais-sop.national.inria.fr 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, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) On the OverDrive (AArch64), =E2=80=98cuirass remote-worker=E2=80=99 (1.2.0-= 1.bdc1f9f) says: starting 2 workers (parallelism: 1 cores) for server at 10.0.0.1 Instead it should use two cores for each worker: --8<---------------cut here---------------start------------->8--- ludo@dover ~$ guile -c '(use-modules (ice-9 threads)) (pk (current-processo= r-count))' ;;; (4) ludo@dover ~$ guile -c '(use-modules (ice-9 threads)) (pk (ceiling-quotient= (current-processor-count) 2))' ;;; (2) ludo@dover ~$ nproc 4 --8<---------------cut here---------------end--------------->8--- Since =E2=80=98current-processor-count=E2=80=99 is implemented indirectly i= n terms of =E2=80=98sched_getaffinity=E2=80=99, this suggests that the process starts = with a bogus affinity mask. (Time passes=E2=80=A6) That=E2=80=99s indeed the case: --8<---------------cut here---------------start------------->8--- ludo@dover ~$ sudo herd status cuirass-remote-worker Status of cuirass-remote-worker: It is started. Running value is 21279. It is enabled. Provides (cuirass-remote-worker). Requires (avahi-daemon guix-daemon networking). Will be respawned. ludo@dover ~$ guile -c '(pk (getaffinity 21279))' ;;; (#*10000000000000000000000000000000000000000000000000000000000000000000= 000000000000000000000000000000000000000000000000000000000000000000000000000= 000000000000000000000000000000000000000000000000000000000000000000000000000= 000000000000000000000000000000000000000000000000000000000000000000000000000= 000000000000000000000000000000000000000000000000000000000000000000000000000= 000000000000000000000000000000000000000000000000000000000000000000000000000= 000000000000000000000000000000000000000000000000000000000000000000000000000= 000000000000000000000000000000000000000000000000000000000000000000000000000= 000000000000000000000000000000000000000000000000000000000000000000000000000= 000000000000000000000000000000000000000000000000000000000000000000000000000= 000000000000000000000000000000000000000000000000000000000000000000000000000= 000000000000000000000000000000000000000000000000000000000000000000000000000= 000000000000000000000000000000000000000000000000000000000000000000000000000= 00000000000000000000000000000000000000000000000000000000) --8<---------------cut here---------------end--------------->8--- Compare to the affinity mask on x86_64-linux-gnu: --8<---------------cut here---------------start------------->8--- ludo@guix-hpc3 ~$ sudo guile -c '(pk (getaffinity 1817))' ;;; (#*11111111111111111111111111111111000000000000000000000000000000000000= 000000000000000000000000000000000000000000000000000000000000000000000000000= 000000000000000000000000000000000000000000000000000000000000000000000000000= 000000000000000000000000000000000000000000000000000000000000000000000000000= 000000000000000000000000000000000000000000000000000000000000000000000000000= 000000000000000000000000000000000000000000000000000000000000000000000000000= 000000000000000000000000000000000000000000000000000000000000000000000000000= 000000000000000000000000000000000000000000000000000000000000000000000000000= 000000000000000000000000000000000000000000000000000000000000000000000000000= 000000000000000000000000000000000000000000000000000000000000000000000000000= 000000000000000000000000000000000000000000000000000000000000000000000000000= 000000000000000000000000000000000000000000000000000000000000000000000000000= 000000000000000000000000000000000000000000000000000000000000000000000000000= 00000000000000000000000000000000000000000000000000000000) --8<---------------cut here---------------end--------------->8--- Interesting that the initial affinity mask differs on aarch64-linux-gnu compared to x86_64-linux-gnu. Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 28 10:29:07 2023 Received: (at 67502-done) by debbugs.gnu.org; 28 Nov 2023 15:29:07 +0000 Received: from localhost ([127.0.0.1]:47433 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r801L-0001CO-0e for submit@debbugs.gnu.org; Tue, 28 Nov 2023 10:29:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37274) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r801I-0001Bt-V4 for 67502-done@debbugs.gnu.org; Tue, 28 Nov 2023 10:29:06 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r8016-00031i-Ja for 67502-done@debbugs.gnu.org; Tue, 28 Nov 2023 10:28:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=c5JwcmewA5XbwHXOzqkl9rAqqbWe9cqzr7Gk7l/iRb8=; b=jF2ZOTM5QS5lGDRlhV9k wWA2HUsgGZ8dqVU/AvmTmC39/2s0rO8fHey9I30/yh+wZyaPWMEaA/uO4I07c4si+cCrEJG3ao2Hh CY6MLWCD2ncnfUBdCERTQ5lK2t7EOtKx/yczMaZ2/blACUN4paZ9/ge9HLoruZGDF79raTTsu3utd n0vnWFS/2Xl+L0uNPUf/hIKTYKS8r0tlnXkWKEIdBfSQvawaBHVCAi706HDU37aVubk5hNqObQVeD CjQJa0ODBALiYBGivEm433N8S5br/2mPo+Hiu9gU1jwAmF44O36OQGgiDGb8A6oBL7YMqpyRGOVt5 AVCzZjJfEwWNJg==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: 67502-done@debbugs.gnu.org Subject: Re: bug#67502: [Cuirass] =?utf-8?Q?=E2=80=98cuirass_remote-worker?= =?utf-8?Q?=E2=80=99?= gets the CPU count wrong on the OverDrive In-Reply-To: <87zfyyutux.fsf@inria.fr> ("Ludovic =?utf-8?Q?Court=C3=A8s=22?= =?utf-8?Q?'s?= message of "Tue, 28 Nov 2023 10:09:42 +0100") References: <87zfyyutux.fsf@inria.fr> Date: Tue, 28 Nov 2023 16:28:50 +0100 Message-ID: <87cyvtsxql.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67502-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ludovic Court=C3=A8s skribis: > ludo@dover ~$ sudo herd status cuirass-remote-worker > Status of cuirass-remote-worker: > It is started. > Running value is 21279. > It is enabled. > Provides (cuirass-remote-worker). > Requires (avahi-daemon guix-daemon networking). > Will be respawned. > ludo@dover ~$ guile -c '(pk (getaffinity 21279))' > > ;;; (#*100000000000000000000000000000000000000000000000000000000000000000= 000000000000000000000000000000000000000000000000000000000000000000000000000= 000000000000000000000000000000000000000000000000000000000000000000000000000= 000000000000000000000000000000000000000000000000000000000000000000000000000= 000000000000000000000000000000000000000000000000000000000000000000000000000= 000000000000000000000000000000000000000000000000000000000000000000000000000= 000000000000000000000000000000000000000000000000000000000000000000000000000= 000000000000000000000000000000000000000000000000000000000000000000000000000= 000000000000000000000000000000000000000000000000000000000000000000000000000= 000000000000000000000000000000000000000000000000000000000000000000000000000= 000000000000000000000000000000000000000000000000000000000000000000000000000= 000000000000000000000000000000000000000000000000000000000000000000000000000= 000000000000000000000000000000000000000000000000000000000000000000000000000= 0000000000000000000000000000000000000000000000000000000000) This was due to =E2=80=98run-fibers=E2=80=99 binding one thread per CPU cor= e. Thus, calling =E2=80=98getaffinity=E2=80=99 from within =E2=80=98run-fibers=E2=80= =99 shows only one CPU and likewise =E2=80=98current-processor-count=E2=80=99 returns 1. Fixed in Cuirass commit 87a6d6ea7ae79fdf487bbcfd44bb3dce2d7c6e82. Ludo=E2=80=99. From unknown Sat Jun 14 05:15:11 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 27 Dec 2023 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator