ubicloud/prog
Hadi Moshayedi 4e35b475a1 Fix learning total_dies in arm64.
We used to always determine the number of CPU dies by counting unique
values in `/sys/devices/system/cpu/cpu*/topology/die_id` files. This
method works on x64 systems but is ineffective on ARM64.

The `topology_die_id` function is defined for x64 architectures in
`arch/x86/include/asm/topology.h` but is not implemented for ARM64 in
`arch/arm64/include/asm/topology.h`.

In Linux kernel 5.15 (used in Ubuntu 22.04), the `die_id` attribute is
exposed with a value of -1 if `topology_die_id` is not defined for the
architecture. Therefore, the `die_id` file for ARM64 consistently has
the value -1, causing our method of counting unique values to always
return 1 on Ubuntu 22.04, regardless of the actual number of dies. This
can cause issues if number of sockets is more than 1, since our code
assumes `total_dies` is a multiple of `total_sockets`.

Starting with Linux kernel 5.17, a change was introduced [1] to expose
the `die_id` file only if `topology_die_id` is defined for the
architecture. Consequently, in Linux kernel 6.8 (used in Ubuntu 24.04),
this file is absent for ARM64 systems. As a result, our method of
counting unique values now produces 0 on Ubuntu 24.04.

Given the lack of a straightforward way to determine the number of dies
on ARM64 systems, this patch sets `total_dies` equal to `total_sockets`,
assuming one die per socket.

[1] 2c4dcd7
2024-11-22 12:08:50 -08:00
..
ai Set load balancer stack for inference endpoints 2024-11-06 16:19:26 +01:00
dns_zone Fix double delete in DNS purge 2024-01-16 12:42:11 +03:00
github Pop from DestroyGithubInstallation if installation already destroyed 2024-11-12 12:17:50 +00:00
minio MinioClusterNexus.destroy cleans-up firewalls too 2024-10-02 12:11:30 +02:00
postgres Make Prog::Postgres::PostgresResourceNexus.dns_zone work when class is frozen 2024-10-30 10:05:52 -07:00
storage Enable Ubuntu 24.04 support by installing OS specific SPDK version. 2024-11-21 11:50:30 -08:00
test Use Ubuntu 24.04 in E2E tests 2024-11-21 11:50:30 -08:00
vm Fix learning total_dies in arm64. 2024-11-22 12:08:50 -08:00
vnet Increase SubnetNexus.wait deadline to 3 minutes 2024-11-19 16:37:01 +01:00
base.rb Reapply "Increase nap time from 0 to 1 in donate" 2024-04-22 14:19:43 +02:00
bootstrap_rhizome.rb Do not create keypair if there is already one in BootstrapRhizome 2023-09-06 07:12:31 +03:00
check_usage_alerts.rb Add usage alerting based on the total consumption 2024-04-22 16:00:57 +02:00
download_boot_image.rb Update runner images to 20241016.1.0 2024-11-07 18:31:49 +03:00
download_cloud_hypervisor.rb Add Prog to download Cloud Hypervisor on-demand 2024-06-13 17:11:42 +02:00
download_firmware.rb Add Prog to download firmware from control plane 2024-05-24 15:32:00 +02:00
expire_project_invitations.rb Expire project invitation after 7 days 2024-09-10 19:21:45 +03:00
heartbeat.rb Add missing service logging to heartbeat 2024-03-29 11:15:53 -07:00
install_dnsmasq.rb Update dnsmasq to v2.89 2023-12-15 13:56:09 -08:00
install_rhizome.rb Re-enable Rhizome Validation 2024-11-04 13:53:55 +02:00
learn_cpu.rb Fix learning total_dies in arm64. 2024-11-22 12:08:50 -08:00
learn_memory.rb Add an identifier to all Prog label methods 2023-08-23 12:09:57 +03:00
learn_network.rb Increase the IPv6 prefix min length to 112 bits 2024-09-27 11:21:33 +02:00
learn_os.rb Save OS version for VmHost 2024-11-21 11:50:30 -08:00
learn_pci.rb Learn about PCI devices of a host 2024-05-07 16:10:05 +02:00
learn_storage.rb Replace VmHost.available_storage_gib and total_storage_gib columns with funcs 2024-04-22 13:29:34 +02:00
page_nexus.rb Add extra data and severity to pages 2024-07-12 14:36:29 +03:00
redeliver_github_failures.rb Reduce the frequency of failed redeliveries to every 5 minutes 2023-12-22 10:12:52 +03:00
remove_boot_image.rb Program to remove a boot image. 2024-05-16 09:32:05 -07:00
resolve_globally_blocked_dnsnames.rb Add prog to update ip addresses of globally blocked dns names 2024-03-13 10:50:40 +01:00
rotate_ssh_key.rb Add an identifier to all Prog label methods 2023-08-23 12:09:57 +03:00
rotate_storage_kek.rb Adjust storage key tool for multiple devices 2024-02-27 12:00:51 -08:00
setup_hugepages.rb Change the hugepages arithmetic. 2024-02-27 11:34:14 -08:00
setup_nftables.rb Start using nftables at host to block unused ip addresses 2024-02-21 11:40:20 +01:00
setup_sysstat.rb Install Sysstat. 2023-11-10 12:54:43 -08:00
test.rb Assemble Pages with correct Prog 2024-07-08 09:46:50 +02:00