[Bug 218622] libc/gen/telldir [hack-n-PATCH] performance limited to O(n) vs file count, O(n^2) against samba ls workload

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Apr 14 17:37:36 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218622

--- Comment #2 from John Baldwin <jhb at FreeBSD.org> ---
So this wasn't purely about standards@ compliance, but there was actual
software that was broken on FreeBSD because of this (it might have involved
using telldir() on a large directory accessed via NFS where the client broke. 
If it's the thing I'm thinking of then you would have an 'ls' on a large NFS
directory that would never complete).  The larger fix is to change
getdirentries() to report a valid seek location with each 'struct dirent'. 
That depends on changing the contents of 'struct dirent' which is a non-trivial
thing to do, but is included in the ongoing 'ino64' work.  Once that is in
place you don't need the telldir cookies at all.  One thing you could do for
now is replace the linear O(n) search with something better like a tree that
you can do a binary search on.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-standards mailing list