News for hackers. Stuff that matters.
Re:Memory is slow, Disk is fast – Part 2 by loloquwowndueo on Thursday September 04, 2025 @10:59PM (#45134599)
Share your code?
Re:Memory is slow, Disk is fast – Part 2 by inetknght on Thursday September 04, 2025 @11:07PM (#45134637)
I don't work there any more (it was a decade ago) and I'm pretty busy right now with a new job coming up (offered today).

Do you have kernel documentation that says that hugetlb doesn't work for files? I don't see that stated anywhere.

Re:Memory is slow, Disk is fast – Part 2 by Sesse__ on Friday September 05, 2025 @05:12AM (#45136551)
It's filesystem-dependent. In particular, tmpfs will work. To the best of my knowledge, no “normal” filesystems (e.g., ext4, xfs) will.
Re:Memory is slow, Disk is fast – Part 2 by inetknght on Friday September 05, 2025 @09:57PM (#45145898)
It works fine on my ext4 fs...
Re:Memory is slow, Disk is fast – Part 2 by inetknght on Friday September 05, 2025 @01:06PM (#45140890)
My bad, don't use `MAP_HUGETLB`, just use `MAP_HUGE_1GB`.

See a quick example I whipped up here: https://github.com/inetknght/mmap-hugetlb