Page MenuHomeFreeBSD

break up vm_map_splay_merge
ClosedPublic

Authored by dougm on Nov 28 2019, 6:03 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 31, 6:24 AM
Unknown Object (File)
Oct 14 2024, 2:30 PM
Unknown Object (File)
Oct 8 2024, 1:15 PM
Unknown Object (File)
Oct 5 2024, 8:25 PM
Unknown Object (File)
Oct 2 2024, 6:35 PM
Unknown Object (File)
Sep 30 2024, 11:21 PM
Unknown Object (File)
Sep 22 2024, 7:06 PM
Unknown Object (File)
Sep 22 2024, 4:49 AM
Subscribers

Details

Summary

Functions that call vm_map_splay_merge sometimes set data fields (e.g. root->left = NULL) to affect the behavior of that function. This change stops that data manipulation, and instead calls a pair of functions, one for the left direction and the other for the right, with the function called depending whether or not we currently null the root child in that direction to control the behavior of vm_map_splay_merge.

Small running-time improvements are visible in my usual vm_map nano-benchmarks.

Before
Test1 sec dc-misses Test2 sec dc-misses
17.402387 696208819 16.695700 756675325
17.488991 702202446 16.695138 744614537
17.460239 734025345 16.569006 729289000
17.512725 743791615 16.580101 723884448
17.569991 763269763 16.628956 721604744

After
17.112856 702574892 16.159560 674984912
17.166679 706461437 16.136775 678707722
17.122392 707339253 16.148504 679940515
17.111229 701338010 16.162141 680050685
17.687890 701092368 16.152907 673210370

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I ran a preliminary 3 hours test with 400 test cases. No problems seen.

Incrementing the nupdates counter, which matters only when DIAGNOSTICS is #defined, fell out of the previous version. Add it back in, in a new and better place.

kib added inline comments.
sys/vm/vm_map.c
999 ↗(On Diff #65014)

This should be written stylish as return (a > b ? a : b);. Note the closing brace location.

This revision is now accepted and ready to land.Nov 28 2019, 7:54 PM