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)
Dec 22 2023, 10:47 PM
Unknown Object (File)
Dec 14 2023, 6:16 AM
Unknown Object (File)
Dec 13 2023, 5:04 AM
Unknown Object (File)
Oct 29 2023, 4:56 AM
Unknown Object (File)
Sep 16 2023, 9:20 PM
Unknown Object (File)
Sep 6 2023, 6:38 PM
Unknown Object (File)
Sep 6 2023, 6:37 PM
Unknown Object (File)
Sep 6 2023, 6:36 PM
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