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)
Feb 27 2024, 2:41 AM
Unknown Object (File)
Jan 6 2024, 9:39 AM
Unknown Object (File)
Dec 28 2023, 6:53 AM
Unknown Object (File)
Dec 20 2023, 7:24 AM
Unknown Object (File)
Sep 16 2023, 7:50 PM
Unknown Object (File)
Sep 16 2023, 7:49 PM
Unknown Object (File)
Sep 16 2023, 7:49 PM
Unknown Object (File)
Sep 15 2023, 4:07 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.