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)
Wed, Nov 26, 4:45 PM
Unknown Object (File)
Wed, Nov 5, 4:27 AM
Unknown Object (File)
Tue, Nov 4, 2:26 AM
Unknown Object (File)
Oct 25 2025, 6:21 PM
Unknown Object (File)
Oct 23 2025, 1:53 PM
Unknown Object (File)
Oct 23 2025, 1:53 PM
Unknown Object (File)
Oct 23 2025, 1:53 PM
Unknown Object (File)
Oct 23 2025, 5:07 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.