Page MenuHomeFreeBSD

Switch autofs to use rbtrees instead of linear searches.
ClosedPublic

Authored by trasz on Mar 13 2016, 9:39 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Aug 21, 4:25 PM
Unknown Object (File)
Sun, Aug 11, 11:55 PM
Unknown Object (File)
Jul 29 2024, 5:45 PM
Unknown Object (File)
Jul 6 2024, 3:59 PM
Unknown Object (File)
Mar 23 2024, 1:27 AM
Unknown Object (File)
Dec 23 2023, 2:38 AM
Unknown Object (File)
Nov 13 2023, 1:43 PM
Unknown Object (File)
Oct 25 2023, 10:07 AM
Subscribers

Details

Summary

Speed up lookups in autofs(5) by using red-black trees instead of linear
searches.

Diff Detail

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

Event Timeline

trasz retitled this revision from to Switch autofs to use rbtrees instead of linear searches..
trasz updated this object.
trasz edited the test plan for this revision. (Show Details)
sys/fs/autofs/autofs_vfsops.c
162 ↗(On Diff #14300)

Why not use RB_FOREACH(_SAFE) ?

sys/fs/autofs/autofs_vfsops.c
162 ↗(On Diff #14300)

I'm not sure that would work. What this does, basically, is it goes to the first leaf node found, deletes it, and loops around. So, in the top level loop we usually iterate over each element more than once.

kib edited edge metadata.
This revision is now accepted and ready to land.Mar 24 2016, 10:54 AM
This revision was automatically updated to reflect the committed changes.