Page MenuHomeFreeBSD

Move kernel vmem arena initialization to vm_kern.c.
ClosedPublic

Authored by markj on Sep 19 2018, 5:20 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, May 12, 9:18 PM
Unknown Object (File)
Fri, May 8, 8:29 PM
Unknown Object (File)
May 1 2026, 10:16 PM
Unknown Object (File)
Apr 27 2026, 11:02 PM
Unknown Object (File)
Apr 27 2026, 4:20 AM
Unknown Object (File)
Apr 16 2026, 4:18 AM
Unknown Object (File)
Apr 16 2026, 12:05 AM
Unknown Object (File)
Apr 15 2026, 9:17 AM
Subscribers

Details

Summary

The details of this initialization belong in vm_kern.c anyway, and allow
me to use KVA_QUANTUM in vm_kern.c without defining it in a header.

No functional change intended.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

alc added inline comments.
sys/vm/vm_kern.c
745–747 ↗(On Diff #48229)

It's not clear to me that using vmem_alloc() as the import function guarantees alignment. I fear that we are only guaranteed that the size is a multiple of KVA_QUANTUM.

This revision is now accepted and ready to land.Sep 19 2018, 5:54 PM
markj added inline comments.
sys/vm/vm_kern.c
745–747 ↗(On Diff #48229)

I think you're right, and the problem is only hidden as a result of the current kernel arena usage patterns. In particular, vmem freelist entries aren't necessarily size-aligned.

This revision was automatically updated to reflect the committed changes.