bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

rm -fr slowness


From: Samuel Thibault
Subject: rm -fr slowness
Date: Sat, 27 Mar 2010 00:58:52 +0100
User-agent: Mutt/1.5.12-2006-07-14

Hello,

I have always been surprised by the slowness of a mere rm -fr. Looking a
bit inside, I see that diskfs_dirremove_hard() calls diskfs_file_update
(dp, 1) (as does diskfs_truncate, diskfs_direnter_hard, and
diskfs_dirrewrite_hard). diskfs_file_update then calls pager_sync on
the pager, which thus writes back the whole ext2fs pager!

This sounds a bit excessive to me, an unlink could just record it in
memory and actually sync later.  Also, the wait flag is set, so we
really waits for all I/Os, which basically means strictly serializing
file removals: remove one file, wait for the disk to have done it
(~10ms), remove the next one, etc.  I guess this is for safety reasons
against crashes, but isn't the sync option there for such kind of
concern?

Samuel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]