aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--block/ll_rw_blk.c12
-rw-r--r--fs/nfs/write.c1
-rw-r--r--include/linux/blkdev.h1
-rw-r--r--include/linux/writeback.h1
-rw-r--r--mm/page-writeback.c9
5 files changed, 24 insertions, 0 deletions
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
index ddd9253f9d55..dcbd6ff1fa33 100644
--- a/block/ll_rw_blk.c
+++ b/block/ll_rw_blk.c
@@ -2734,6 +2734,18 @@ long blk_congestion_wait(int rw, long timeout)
2734 2734
2735EXPORT_SYMBOL(blk_congestion_wait); 2735EXPORT_SYMBOL(blk_congestion_wait);
2736 2736
2737/**
2738 * blk_congestion_end - wake up sleepers on a congestion queue
2739 * @rw: READ or WRITE
2740 */
2741void blk_congestion_end(int rw)
2742{
2743 wait_queue_head_t *wqh = &congestion_wqh[rw];
2744
2745 if (waitqueue_active(wqh))
2746 wake_up(wqh);
2747}
2748
2737/* 2749/*
2738 * Has to be called with the request spinlock acquired 2750 * Has to be called with the request spinlock acquired
2739 */ 2751 */
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 453d44666ea5..38ba5c09af08 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -396,6 +396,7 @@ int nfs_writepages(struct address_space *mapping, struct writeback_control *wbc)
396out: 396out:
397 clear_bit(BDI_write_congested, &bdi->state); 397 clear_bit(BDI_write_congested, &bdi->state);
398 wake_up_all(&nfs_write_congestion); 398 wake_up_all(&nfs_write_congestion);
399 writeback_congestion_end();
399 return err; 400 return err;
400} 401}
401 402
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index aafe82788b4e..96c9040c00a8 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -746,6 +746,7 @@ extern void blk_queue_free_tags(request_queue_t *);
746extern int blk_queue_resize_tags(request_queue_t *, int); 746extern int blk_queue_resize_tags(request_queue_t *, int);
747extern void blk_queue_invalidate_tags(request_queue_t *); 747extern void blk_queue_invalidate_tags(request_queue_t *);
748extern long blk_congestion_wait(int rw, long timeout); 748extern long blk_congestion_wait(int rw, long timeout);
749extern void blk_congestion_end(int rw);
749 750
750extern void blk_rq_bio_prep(request_queue_t *, struct request *, struct bio *); 751extern void blk_rq_bio_prep(request_queue_t *, struct request *, struct bio *);
751extern int blkdev_issue_flush(struct block_device *, sector_t *); 752extern int blkdev_issue_flush(struct block_device *, sector_t *);
diff --git a/include/linux/writeback.h b/include/linux/writeback.h
index 9e38b566d0e7..0422036af4eb 100644
--- a/include/linux/writeback.h
+++ b/include/linux/writeback.h
@@ -85,6 +85,7 @@ int wakeup_pdflush(long nr_pages);
85void laptop_io_completion(void); 85void laptop_io_completion(void);
86void laptop_sync_completion(void); 86void laptop_sync_completion(void);
87void throttle_vm_writeout(void); 87void throttle_vm_writeout(void);
88void writeback_congestion_end(void);
88 89
89/* These are exported to sysctl. */ 90/* These are exported to sysctl. */
90extern int dirty_background_ratio; 91extern int dirty_background_ratio;
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index e630188ccc40..77a0bc4e261a 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -803,6 +803,15 @@ int test_set_page_writeback(struct page *page)
803EXPORT_SYMBOL(test_set_page_writeback); 803EXPORT_SYMBOL(test_set_page_writeback);
804 804
805/* 805/*
806 * Wakes up tasks that are being throttled due to writeback congestion
807 */
808void writeback_congestion_end(void)
809{
810 blk_congestion_end(WRITE);
811}
812EXPORT_SYMBOL(writeback_congestion_end);
813
814/*
806 * Return true if any of the pages in the mapping are marged with the 815 * Return true if any of the pages in the mapping are marged with the
807 * passed tag. 816 * passed tag.
808 */ 817 */