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)
Sun, Oct 20, 4:54 AM
Unknown Object (File)
Sat, Oct 19, 12:16 AM
Unknown Object (File)
Oct 2 2024, 8:08 AM
Unknown Object (File)
Sep 25 2024, 8:40 AM
Unknown Object (File)
Sep 24 2024, 9:58 PM
Unknown Object (File)
Sep 22 2024, 12:55 AM
Unknown Object (File)
Sep 16 2024, 1:11 PM
Unknown Object (File)
Sep 9 2024, 3:30 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.