Page MenuHomeFreeBSD

vm_radix: eliminate reload in _remove
ClosedPublic

Authored by dougm on Jun 22 2023, 9:42 PM.
Tags
None
Referenced Files
F115091391: D40721.id123708.diff
Sun, Apr 20, 9:31 AM
F115054597: D40721.id.diff
Sun, Apr 20, 1:09 AM
F115050488: D40721.id123683.diff
Sun, Apr 20, 12:12 AM
F115049432: D40721.id123659.diff
Sat, Apr 19, 11:58 PM
F115048323: D40721.id.diff
Sat, Apr 19, 11:44 PM
F115045935: D40721.diff
Sat, Apr 19, 11:11 PM
Unknown Object (File)
Sat, Apr 19, 7:24 AM
Unknown Object (File)
Fri, Apr 11, 8:26 PM
Subscribers

Details

Summary

In the loop that searches for the last child, load that child once, without loading it again after the search is over. Change a comparison from ">= 1" to "!= 0". The two changes reduce code size by 32 bytes on amd64.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

dougm requested review of this revision.Jun 22 2023, 9:42 PM
dougm created this revision.

Drop the broken comparison change. Now, I can only save 16 bytes.

sys/vm/vm_radix.c
782–784

Wouldn't it now make more sense to assert that tmp is not NULL?

dougm marked an inline comment as done.

Change asserts to check NULL.

sys/vm/vm_radix.c
782–784

Yes.

This revision is now accepted and ready to land.Jun 23 2023, 11:03 PM
This revision was automatically updated to reflect the committed changes.