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)
Sat, May 11, 6:10 PM
Unknown Object (File)
Fri, May 3, 10:20 AM
Unknown Object (File)
Thu, May 2, 8:08 AM
Unknown Object (File)
Sat, Apr 27, 3:10 AM
Unknown Object (File)
Sat, Apr 20, 6:05 PM
Unknown Object (File)
Feb 25 2024, 5:48 PM
Unknown Object (File)
Dec 22 2023, 10:22 PM
Unknown Object (File)
Dec 22 2023, 2:51 AM
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