HomeFreeBSD

vm_phys_enqueue_contig: handle npages==0

Description

vm_phys_enqueue_contig: handle npages==0

By letting vm_phys_enqueue_contig handle the case when npages == 0,
the callers can stop checking it, and the compiler can stop
zero-checking with every call to ffs(). Letting vm_phys_enqueue_contig
call vm_phys_enqueue_contig for part of its work also saves a few
bytes.

The amd64 object code shrinks by 128 bytes.

Reviewed by: kib (previous version)
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D41154

Details

Provenance
dougmAuthored on Aug 3 2023, 2:19 PM
Reviewer
kib
Differential Revision
D41154: vm_phys_enqueue_contig: handle zero pages
Parents
rG9c0a2d522f3a: hwpmc_armv7: plug memory leak
Branches
Unknown
Tags
Unknown