diff options
author | Jens Axboe <axboe@suse.de> | 2006-06-13 02:26:10 -0400 |
---|---|---|
committer | Jens Axboe <axboe@nelson.home.kernel.dk> | 2006-06-23 11:10:39 -0400 |
commit | b31dc66a54ad986b6b73bdc49c8efc17cbad1833 (patch) | |
tree | 5591383c1cbffe11512da889c971f899333f1a44 /drivers/usb/gadget | |
parent | 271f18f102c789f59644bb6c53a69da1df72b2f4 (diff) |
[PATCH] Kill PF_SYNCWRITE flag
A process flag to indicate whether we are doing sync io is incredibly
ugly. It also causes performance problems when one does a lot of async
io and then proceeds to sync it. Part of the io will go out as async,
and the other part as sync. This causes a disconnect between the
previously submitted io and the synced io. For io schedulers such as CFQ,
this will cause us lost merges and suboptimal behaviour in scheduling.
Remove PF_SYNCWRITE completely from the fsync/msync paths, and let
the O_DIRECT path just directly indicate that the writes are sync
by using WRITE_SYNC instead.
Signed-off-by: Jens Axboe <axboe@suse.de>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | drivers/usb/gadget/file_storage.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c index 6f887478b14..a43dc908ac5 100644 --- a/drivers/usb/gadget/file_storage.c +++ b/drivers/usb/gadget/file_storage.c | |||
@@ -1906,7 +1906,6 @@ static int fsync_sub(struct lun *curlun) | |||
1906 | 1906 | ||
1907 | inode = filp->f_dentry->d_inode; | 1907 | inode = filp->f_dentry->d_inode; |
1908 | mutex_lock(&inode->i_mutex); | 1908 | mutex_lock(&inode->i_mutex); |
1909 | current->flags |= PF_SYNCWRITE; | ||
1910 | rc = filemap_fdatawrite(inode->i_mapping); | 1909 | rc = filemap_fdatawrite(inode->i_mapping); |
1911 | err = filp->f_op->fsync(filp, filp->f_dentry, 1); | 1910 | err = filp->f_op->fsync(filp, filp->f_dentry, 1); |
1912 | if (!rc) | 1911 | if (!rc) |
@@ -1914,7 +1913,6 @@ static int fsync_sub(struct lun *curlun) | |||
1914 | err = filemap_fdatawait(inode->i_mapping); | 1913 | err = filemap_fdatawait(inode->i_mapping); |
1915 | if (!rc) | 1914 | if (!rc) |
1916 | rc = err; | 1915 | rc = err; |
1917 | current->flags &= ~PF_SYNCWRITE; | ||
1918 | mutex_unlock(&inode->i_mutex); | 1916 | mutex_unlock(&inode->i_mutex); |
1919 | VLDBG(curlun, "fdatasync -> %d\n", rc); | 1917 | VLDBG(curlun, "fdatasync -> %d\n", rc); |
1920 | return rc; | 1918 | return rc; |