Commit 57eb0613 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] speed up sys_sync()

Well it's a one-liner.  sys_sync() only syncs one queue at a time, and
can be slow if you have a lot of disks.  So poke pdflush, which knows
how to write all the queues in parallel.
parent 4f3e8109
...@@ -242,10 +242,12 @@ int fsync_bdev(struct block_device *bdev) ...@@ -242,10 +242,12 @@ int fsync_bdev(struct block_device *bdev)
} }
/* /*
* sync everything. * sync everything. Start out by waking pdflush, because that writes back
* all queues in parallel.
*/ */
asmlinkage long sys_sync(void) asmlinkage long sys_sync(void)
{ {
wakeup_bdflush(0);
sync_inodes(0); /* All mappings and inodes, including block devices */ sync_inodes(0); /* All mappings and inodes, including block devices */
DQUOT_SYNC(NULL); DQUOT_SYNC(NULL);
sync_supers(); /* Write the superblocks */ sync_supers(); /* Write the superblocks */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment