Page MenuHomeFreeBSD

vm_phys: Factor out some calls to vm_freelist_add()
AcceptedPublic

Authored by markj on Jun 2 2023, 7:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 14, 7:44 AM
Unknown Object (File)
Mon, Nov 11, 11:31 PM
Unknown Object (File)
Sun, Nov 10, 3:36 AM
Unknown Object (File)
Sat, Nov 9, 11:08 PM
Unknown Object (File)
Sat, Nov 9, 10:26 PM
Unknown Object (File)
Sat, Nov 9, 10:25 PM
Unknown Object (File)
Sat, Nov 9, 9:07 PM
Unknown Object (File)
Sat, Nov 9, 6:25 PM
Subscribers

Details

Summary

A subsequent patch will make this factoring more worthwhile.

No functional change intended.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 53318
Build 50209: arc lint + arc unit

Event Timeline

markj requested review of this revision.Jun 2 2023, 7:36 PM
This revision is now accepted and ready to land.Jun 2 2023, 8:09 PM
This revision now requires review to proceed.Aug 25 2023, 12:34 AM
markj retitled this revision from vm_phys: Factor out some duplicated code in vm_phys_enqueue_contig() to vm_phys: Factor out some calls to vm_freelist_add().Aug 25 2023, 12:35 AM

When I compile GENERIC-NODEBUG on amd64, I see that this change makes some functions grow larger. In particular, vm_phys_alloc_pages and vm_phys_enqueue_contig.

0000000000000930 <vm_phys_alloc_npages>:                        0000000000000930 <vm_phys_alloc_npages>:
0000000000000ea0 <vm_phys_alloc_pages>:                       | 0000000000000ec0 <vm_phys_alloc_pages>:
0000000000000f10 <vm_phys_alloc_freelist_pages>:              | 0000000000000f30 <vm_phys_alloc_freelist_pages>:
0000000000001180 <vm_phys_paddr_to_vm_page>:                  | 00000000000011a0 <vm_phys_paddr_to_vm_page>:
0000000000001200 <vm_phys_fictitious_to_vm_page>:             | 0000000000001220 <vm_phys_fictitious_to_vm_page>:
0000000000001270 <vm_phys_fictitious_reg_range>:              | 0000000000001290 <vm_phys_fictitious_reg_range>:
0000000000001780 <vm_phys_fictitious_unreg_range>:            | 00000000000017a0 <vm_phys_fictitious_unreg_range>:
0000000000001b40 <vm_phys_free_pages>:                        | 0000000000001b60 <vm_phys_free_pages>:
0000000000001cf0 <vm_phys_enqueue_contig>:                    | 0000000000001d10 <vm_phys_enqueue_contig>:
0000000000001e70 <vm_phys_free_contig>:                       | 0000000000001ea0 <vm_phys_free_contig>:

Tolerate some code duplication to avoid making vm_phys.o larger.

Fix handling of "tail".

sys/vm/vm_phys.c
684

What is the advantage of this new function over a change that just adds the KASSERT to vm_freelist_add?

sys/vm/vm_phys.c
684

The subsequent patch adds more callers and further extends the function.

This revision is now accepted and ready to land.Jan 27 2024, 8:35 PM