Page MenuHomeFreeBSD

Avoid unneeded initializations in vm_phys_init_page().
ClosedPublic

Authored by markj on Nov 25 2017, 10:37 PM.
Tags
None
Referenced Files
Unknown Object (File)
Apr 25 2026, 9:48 AM
Unknown Object (File)
Apr 22 2026, 3:57 AM
Unknown Object (File)
Apr 22 2026, 12:15 AM
Unknown Object (File)
Apr 21 2026, 5:34 PM
Unknown Object (File)
Apr 6 2026, 9:14 PM
Unknown Object (File)
Apr 5 2026, 12:11 AM
Unknown Object (File)
Mar 31 2026, 4:15 AM
Unknown Object (File)
Mar 26 2026, 6:21 AM
Subscribers
None

Details

Summary

The aflags and oflags fields are always initialized by the vm_page.c
allocators.

Diff Detail

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

Event Timeline

This revision is now accepted and ready to land.Nov 26 2017, 5:03 AM

You mean that the allocators vm_page_alloc(), vm_page_alloc_contig(), and vm_page_alloc_freelist() overwrite the fields anyway.

What is the point of keeping the function in vm_phys.c ? If moved to vm_page.c, compiler most likely inlines its only use.

In D13242#276188, @kib wrote:

You mean that the allocators vm_page_alloc(), vm_page_alloc_contig(), and vm_page_alloc_freelist() overwrite the fields anyway.

What is the point of keeping the function in vm_phys.c ? If moved to vm_page.c, compiler most likely inlines its only use.

For that, vm_phys_paddr_to_segind() needs to be changed from static to extern. I would be fine with that too.

This revision was automatically updated to reflect the committed changes.