Page MenuHomeFreeBSD

Remove PAGE_SIZE from libthr
ClosedPublic

Authored by andrew on Apr 20 2022, 4:26 PM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 5 2024, 11:11 PM
Unknown Object (File)
Oct 3 2024, 8:45 PM
Unknown Object (File)
Oct 1 2024, 10:24 AM
Unknown Object (File)
Oct 1 2024, 5:27 AM
Unknown Object (File)
Sep 30 2024, 1:34 PM
Unknown Object (File)
Sep 22 2024, 6:42 PM
Unknown Object (File)
Sep 18 2024, 1:17 PM
Unknown Object (File)
Sep 18 2024, 4:11 AM
Subscribers

Details

Summary

In libthr we use PAGE_SIZE when allocating memory with mmap and to check
various structs will fit into a single page so we can use this allocator
for them.

Ask the kernel for the page size on init for use by the page allcator
and add a new machine dependent macro to hold the smallest page size
the architecture supports to check the structure is small enough.

This allows us to use the same libthr on arm64 with either 4k or 16k
pages.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 45255
Build 42143: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Apr 20 2022, 8:13 PM
kib added inline comments.
lib/libthr/thread/thr_barrier.c
40

I think this change is not strictly needed, since off-page is really a page size.

I must admit that arm64 with PAGE_SIZE != 4k is really a different arch, it should not be called arm64.

This revision was automatically updated to reflect the committed changes.