Page MenuHomeFreeBSD

vmem: Add vmem_alloc_aligned
AbandonedPublic

Authored by andrew on Nov 28 2023, 4:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sep 24 2024, 9:44 PM
Unknown Object (File)
Sep 24 2024, 4:21 PM
Unknown Object (File)
Sep 20 2024, 6:42 PM
Unknown Object (File)
Sep 18 2024, 7:26 AM
Unknown Object (File)
Sep 17 2024, 9:09 PM
Unknown Object (File)
Sep 6 2024, 1:34 AM
Unknown Object (File)
Sep 3 2024, 5:41 AM
Unknown Object (File)
Aug 23 2024, 10:41 PM
Subscribers

Details

Reviewers
alc
kib
markj
Summary

To allow vmem to allocate aligned addresses add the vmem_alloc_aligned
variant of vmem_alloc.

Sponsored by: Arm Ltd

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 54641
Build 51530: arc lint + arc unit

Event Timeline

vmem_xalloc() is a public interface which allows callers to request particular alignment. Can't it be used instead?

At least, vmem_alloc_aligned() can simply use vmem_alloc() if the requested alignment is satisfied by all members of the arena, and vmem_xalloc() otherwise. Then you'll hit the quantum cache when possible. But presumably the caller would know when that's the case and can decide itself whether to use vmem_alloc() or vmem_xalloc().