Page MenuHomeFreeBSD

vmem: Add vmem_alloc_aligned
AbandonedPublic

Authored by andrew on Nov 28 2023, 4:18 PM.
Tags
None
Referenced Files
F122545597: D42787.id130648.diff
Sun, Jul 6, 3:36 AM
Unknown Object (File)
Sat, Jul 5, 1:46 PM
Unknown Object (File)
Sat, Jul 5, 11:23 AM
Unknown Object (File)
Wed, Jul 2, 11:55 PM
Unknown Object (File)
Thu, Jun 26, 11:21 AM
Unknown Object (File)
Tue, Jun 24, 9:57 PM
Unknown Object (File)
Sat, Jun 7, 8:34 AM
Unknown Object (File)
May 11 2025, 3:02 AM
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().