Using GNU rm -rf (from coreutils-5.93[1]), that takes about 14s wall clocktime on an otherwise idle system running 2.6.14. The 5.93 implementationuses open, fchdir, fstat, opendir/readdir, unlink, etc. to do its job:i.e., no openat-related functions.

Compare that with GNU rm from the latest CVS sources[2], now f?chdir-free,using /proc-based openat emulation (including emulation of fdopendir[3],fstatat, and unlinkat). Here, the time required about 35 seconds:more than double. Even after rewriting the emulation code not to usesnprintf, the resulting times were still about 30s.

Contrast that with Solaris 9 (with kernel-provided openat, fstatat,fdopendir, etc.), where the openat-based implementation takes20% *less* time than the 5.93 implementation.

Sure, there may well be other factors that explain some of the difference,but it'd be nice to avoid the added time and space(stack) overhead ofencoding and decoding each /proc-relative file name. Of course,syscall-based interfaces also have the advantage of working even if/proc is not accessible.