fix for slow unmount on ext4 - bug 543617 on lp

Kees Cook kees.cook at canonical.com
Thu Jun 10 19:13:41 UTC 2010


On Thu, Jun 10, 2010 at 08:57:55AM +0200, Stefan Bader wrote:
> Err, wasn't that the reason for the patch below in the first place? Maybe my
> description was not completely accurate. It was very long time to unmount. I
> might be wrong but in my memory that was as bad as 30m in bad cases.
> For which the reason is that sync is done syncronously.

Without the forced-sync-on-umount work-around patch:
- umount of a single filesystem with barrier support on an idle system can
  take upwards of 15 minutes.
- umount of a single filesystem with barrier support on a busy system can
  take upwards of 4 hours.
- umount of everything else is fast and normal (less than a hundredth of
  a second to umount a bind mount), regardless of system IO load.

With patch:
- umount of a single filesystem with barrier support on an idle system
  will take as long as a normal sync and umount (i.e. fast and normal).
- umount of everything else on an idle system takes as long as a sync
  and umount (raises trivial bind umounts to at least 1 second).
- umount of everything else on a busy system takes as long as a sync
  of the entire system and umount of the filesystem (which can sometimes
  take upwards of 4 hours due to the original problem of dirty umounting
  of filesystems with barrier support).

The addition of the sync workaround means that busy systems will have
umount blocked for as long as _all_ sync activity takes on the given
system.  I'll leave it up to you, but for me in most cases, the patch
made my system significantly worse than without it.

-Kees

-- 
Kees Cook
Ubuntu Security Team




More information about the kernel-team mailing list