linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Quadratic behavior of shrink_dcache_parent()
@ 2006-11-20 11:10 Miklos Szeredi
  2006-11-20 23:03 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: Miklos Szeredi @ 2006-11-20 11:10 UTC (permalink / raw)
  To: linux-fsdevel, linux-kernel

The shrink_dcache_parent() can take a very long time for deep
directory trees: minutes for depth of 100,000, probably hours for
depth of 1,000,000.

The reason is that after dropping a leaf, it starts again from the
root.

Filesystems affected include FUSE, NFS, CIFS.  Others I haven't
checked.  NFS and to a lesser extent CIFS don't seem to efficiently
handle lookups within such a deep hierarchy, so they're sort of
immune.

But with FUSE it's pretty easy to DoS the system.

Limiting the depth to some sane value could work around this problem,
but that would mean having to traverse subtrees in rename().

Any better ideas?

Thanks,
Miklos

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-11-20 23:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-20 11:10 Quadratic behavior of shrink_dcache_parent() Miklos Szeredi
2006-11-20 23:03 ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).