Re: endless sync on bdi_sched_wait()? 2.6.33.1

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Dave Chinner
Date: Monday, April 19, 2010 - 12:23 am

This is food for thought. On XFS, the only difference between sync
and freeze is that freeze stops incoming writers:

$ dd if=/dev/zero of=/mnt/scratch/test bs=1024k count=8000 &
[1] 2565
$ sleep 5; time (sudo xfs_freeze -f /mnt/scratch ; sudo xfs_freeze -u /mnt/scratch)

real    0m2.536s
user    0m0.000s
sys     0m0.020s
$ sleep 5; time (sudo xfs_freeze -f /mnt/scratch ; sudo xfs_freeze -u /mnt/scratch)

real    0m2.251s
user    0m0.004s
sys     0m0.012s
$ sleep 5; time (sudo xfs_freeze -f /mnt/scratch ; sudo xfs_freeze -u /mnt/scratch)

real    0m1.985s
user    0m0.004s
sys     0m0.024s
$ sleep 5; time sync
8000+0 records in
8000+0 records out
8388608000 bytes (8.4 GB) copied, 80.822 s, 104 MB/s
[1]+  Done                    dd if=/dev/zero of=/mnt/scratch/test
bs=1024k count=8000

real    0m47.237s
user    0m0.036s
sys     0m18.769s
$

Freezing the filesystem and immediately unfreezing is much, much
faster than running sync, yet it gives us exactly the same data
integrity guarantees without the endless blocking problems. Is it
time to make sure every filesystem implements freeze and thaw, and
start using them for sync instead of the current code?

Cheers,

Dave.



On Mon, Apr 19, 2010 at 05:04:58PM +1000, Dave Chinner wrote:

-- 
Dave Chinner
david@fromorbit.com
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: endless sync on bdi_sched_wait()? 2.6.33.1, Jan Kara, (Thu Apr 8, 2:28 am)
Re: endless sync on bdi_sched_wait()? 2.6.33.1, Denys Fedorysychenko, (Thu Apr 8, 3:12 am)
Re: endless sync on bdi_sched_wait()? 2.6.33.1, Dave Chinner, (Sun Apr 11, 5:47 pm)
Re: endless sync on bdi_sched_wait()? 2.6.33.1, Dave Chinner, (Sun Apr 18, 6:37 pm)
Re: endless sync on bdi_sched_wait()? 2.6.33.1, Dave Chinner, (Mon Apr 19, 12:23 am)
Re: endless sync on bdi_sched_wait()? 2.6.33.1, Jan Kara, (Tue Apr 20, 5:33 pm)
Re: endless sync on bdi_sched_wait()? 2.6.33.1, Dave Chinner, (Tue Apr 20, 6:54 pm)
Re: endless sync on bdi_sched_wait()? 2.6.33.1, Jan Kara, (Wed Apr 21, 6:27 am)
Re: endless sync on bdi_sched_wait()? 2.6.33.1, Dave Chinner, (Wed Apr 21, 5:06 pm)
Re: endless sync on bdi_sched_wait()? 2.6.33.1, Jan Kara, (Thu Apr 22, 5:48 am)