Skip to content

Conversation

@andre4ik3
Copy link
Contributor

Adds memory page size reporting in bytes in the page_size field of CPU details. Technically page size would be considered a kernel property, e.g. on x86_64 and most aarch64 hardware it's 4096, on Asahi it's normally 16384 but hypothetically possible to be 4096, and on Ampere there are supported kernels of 4096, 16384, and 65536 page sizes. But since it's tied to the CPU architecture, it made most sense to me to put it under CPU details.

Example in a Linux VM:

[root@MacBook-Pro-2023:~]# getconf PAGESIZE
4096

[root@MacBook-Pro-2023:~]# nix run github:andre4ik3/nixos-facter/cpu-page-size | jq .hardware.cpu[0].page_size
4096

Example on an Asahi Linux machine:

root@athena:~# getconf PAGESIZE
16384
root@athena:~# nix run github:andre4ik3/nixos-facter/cpu-page-size | jq .hardware.cpu[0].page_size
16384

@Mic92 Mic92 added this pull request to the merge queue Aug 29, 2025
Merged via the queue into nix-community:main with commit b9db711 Aug 29, 2025
2 checks passed
@andre4ik3 andre4ik3 deleted the cpu-page-size branch August 29, 2025 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants