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)
Oct 8 2024, 9:41 PM
Unknown Object (File)
Sep 27 2024, 12:26 AM
Unknown Object (File)
Sep 22 2024, 6:40 AM
Unknown Object (File)
Sep 19 2024, 2:55 AM
Unknown Object (File)
Sep 16 2024, 8:40 PM
Unknown Object (File)
Sep 11 2024, 11:11 AM
Unknown Object (File)
Sep 9 2024, 10:09 PM
Unknown Object (File)
Sep 8 2024, 7:28 PM
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.