diff options
| author | Stephen Boyd <sboyd@codeaurora.org> | 2015-10-02 11:29:54 -0700 |
|---|---|---|
| committer | Stephen Boyd <sboyd@codeaurora.org> | 2015-10-02 11:29:54 -0700 |
| commit | c0d625cbb541ae68ca3c97fb62f5f6093d3382fa (patch) | |
| tree | c67ca474f4fd998829591b50b6f47e58d5b7c8df /fs/fs-writeback.c | |
| parent | 3b4261dcf65993f95de80a0d63c5299aab922bd8 (diff) | |
| parent | 9f30a04d768f64280dc0c40b730746e82f298d88 (diff) | |
Merge branch 'clk-fixes' into clk-next
* clk-fixes: (3 commits)
clk: ti: dflt: fix enable_reg validity check
clk: ti: fix dual-registration of uart4_ick
clk: ti: clk-7xx: Remove hardwired ABE clock configuration
Diffstat (limited to 'fs/fs-writeback.c')
| -rw-r--r-- | fs/fs-writeback.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 587ac08eabb6..091a36444972 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -1481,6 +1481,21 @@ static long writeback_sb_inodes(struct super_block *sb, wbc_detach_inode(&wbc); work->nr_pages -= write_chunk - wbc.nr_to_write; wrote += write_chunk - wbc.nr_to_write; + + if (need_resched()) { + /* + * We're trying to balance between building up a nice + * long list of IOs to improve our merge rate, and + * getting those IOs out quickly for anyone throttling + * in balance_dirty_pages(). cond_resched() doesn't + * unplug, so get our IOs out the door before we + * give up the CPU. + */ + blk_flush_plug(current); + cond_resched(); + } + + spin_lock(&wb->list_lock); spin_lock(&inode->i_lock); if (!(inode->i_state & I_DIRTY_ALL)) @@ -1488,7 +1503,7 @@ static long writeback_sb_inodes(struct super_block *sb, requeue_inode(inode, wb, &wbc); inode_sync_complete(inode); spin_unlock(&inode->i_lock); - cond_resched_lock(&wb->list_lock); + /* * bail out to wb_writeback() often enough to check * background threshold and other termination conditions. |
