Skip to content

Commit c4dc4be

Browse files
Peter ZijlstraLinus Torvalds
authored andcommitted
nfs: remove congestion_end()
These patches aim to improve balance_dirty_pages() and directly address three issues: 1) inter device starvation 2) stacked device deadlocks 3) inter process starvation 1 and 2 are a direct result from removing the global dirty limit and using per device dirty limits. By giving each device its own dirty limit is will no longer starve another device, and the cyclic dependancy on the dirty limit is broken. In order to efficiently distribute the dirty limit across the independant devices a floating proportion is used, this will allocate a share of the total limit proportional to the device's recent activity. 3 is done by also scaling the dirty limit proportional to the current task's recent dirty rate. This patch: nfs: remove congestion_end(). It's redundant, clear_bdi_congested() already wakes the waiters. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Cc: "J. Bruce Fields" <bfields@fieldses.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 1f7d666 commit c4dc4be

3 files changed

Lines changed: 1 addition & 17 deletions

File tree

‎fs/nfs/write.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,10 +242,8 @@ static void nfs_end_page_writeback(struct page *page)
242242
struct nfs_server *nfss = NFS_SERVER(inode);
243243

244244
end_page_writeback(page);
245-
if (atomic_long_dec_return(&nfss->writeback) < NFS_CONGESTION_OFF_THRESH) {
245+
if (atomic_long_dec_return(&nfss->writeback) < NFS_CONGESTION_OFF_THRESH)
246246
clear_bdi_congested(&nfss->backing_dev_info, WRITE);
247-
congestion_end(WRITE);
248-
}
249247
}
250248

251249
/*

‎include/linux/backing-dev.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ static inline int bdi_rw_congested(struct backing_dev_info *bdi)
9393
void clear_bdi_congested(struct backing_dev_info *bdi, int rw);
9494
void set_bdi_congested(struct backing_dev_info *bdi, int rw);
9595
long congestion_wait(int rw, long timeout);
96-
void congestion_end(int rw);
9796

9897
#define bdi_cap_writeback_dirty(bdi) \
9998
(!((bdi)->capabilities & BDI_CAP_NO_WRITEBACK))

‎mm/backing-dev.c‎

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,3 @@ long congestion_wait(int rw, long timeout)
5454
return ret;
5555
}
5656
EXPORT_SYMBOL(congestion_wait);
57-
58-
/**
59-
* congestion_end - wake up sleepers on a congested backing_dev_info
60-
* @rw: READ or WRITE
61-
*/
62-
void congestion_end(int rw)
63-
{
64-
wait_queue_head_t *wqh = &congestion_wqh[rw];
65-
66-
if (waitqueue_active(wqh))
67-
wake_up(wqh);
68-
}
69-
EXPORT_SYMBOL(congestion_end);

0 commit comments

Comments
 (0)