Page MenuHomeFreeBSD

vm_phys: Factor out some calls to vm_freelist_add()
ClosedPublic

Authored by markj on Jun 2 2023, 7:36 PM.
Tags
None
Referenced Files
F97799140: D40400.id139830.diff
Tue, Oct 1, 7:56 AM
Unknown Object (File)
Mon, Sep 30, 4:10 AM
Unknown Object (File)
Tue, Sep 10, 6:27 PM
Unknown Object (File)
Tue, Sep 10, 6:27 PM
Unknown Object (File)
Sun, Sep 8, 5:56 PM
Unknown Object (File)
Sat, Sep 7, 11:59 AM
Unknown Object (File)
Wed, Sep 4, 10:15 AM
Unknown Object (File)
Aug 30 2024, 9:30 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 53286
Build 50177: 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
This revision was automatically updated to reflect the committed changes.
markj marked an inline comment as done.