Subject: Re: bug#67502: [Cuirass] ‘cuirass remote-worker’ gets the CPU count wrong on the OverDrive
From: Ludovic Courtès <[email-masked]>
To: [email-masked]
Date: Tue, 28 Nov 2023 16:28:50 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Ludovic Courtès <[email-masked]> 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))'
>
> ;;; (#*1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000)

This was due to ‘run-fibers’ binding one thread per CPU core.  Thus,
calling ‘getaffinity’ from within ‘run-fibers’ shows only one CPU and
likewise ‘current-processor-count’ returns 1.

Fixed in Cuirass commit 87a6d6ea7ae79fdf487bbcfd44bb3dce2d7c6e82.

Ludo’.