Page MenuHomeFreeBSD

swap_pager: small improvement to find_least
ClosedPublic

Authored by dougm on Jun 11 2024, 7:38 AM.
Tags
None
Referenced Files
F107082563: D45558.id.diff
Thu, Jan 9, 8:26 PM
Unknown Object (File)
Dec 5 2024, 4:47 PM
Unknown Object (File)
Dec 4 2024, 10:28 AM
Unknown Object (File)
Nov 22 2024, 7:14 PM
Unknown Object (File)
Nov 6 2024, 8:57 AM
Unknown Object (File)
Nov 6 2024, 8:46 AM
Unknown Object (File)
Nov 6 2024, 6:29 AM
Unknown Object (File)
Oct 28 2024, 2:55 PM
Subscribers

Details

Summary

This change drops an unneeded test, a branch and avoids a needless computation. Altogether, it saves 10 bytes of instructions on amd64.

It will mean that, on the path to MPASS(0), the same lookup and iteration will happen twice.

Test Plan

The kernel still boots.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

dougm requested review of this revision.Jun 11 2024, 7:38 AM
dougm created this revision.
kib added inline comments.
sys/vm/swap_pager.c
2279
2312

Perhaps it is the time to change these two lines into __unreachable().

This revision is now accepted and ready to land.Jun 11 2024, 2:39 PM
This revision was automatically updated to reflect the committed changes.