]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
vm_phys_enqueue_contig: handle npages==0
authorDoug Moore <dougm@FreeBSD.org>
Wed, 2 Aug 2023 03:12:00 +0000 (22:12 -0500)
committerDoug Moore <dougm@FreeBSD.org>
Wed, 2 Aug 2023 03:12:00 +0000 (22:12 -0500)
commit1a7fcf6d51eb67ee3e05fdbb806f7e68f9f53c9c
treea6aafe9b9aa08315865563de734f38326ffa1ead
parent77f6be448408eda1a31b1c98576e6c6bebf6ea6e
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 80 bytes.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D41154
sys/vm/vm_phys.c