The patch titled writeback: remove unnecessary wait in throttle_vm_writeout() has been added to the -mm tree. Its filename is writeback-remove-unnecessary-wait-in-throttle_vm_writeout.patch *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: writeback: remove unnecessary wait in throttle_vm_writeout() From: Fengguang Wu <wfg@xxxxxxxxxxxxxxxx> We don't want to introduce pointless delays in throttle_vm_writeout() when the writeback limits are not yet exceeded, do we? Cc: Nick Piggin <nickpiggin@xxxxxxxxxxxx> Cc: OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx> Cc: Kumar Gala <galak@xxxxxxxxxxxxxxxxxxx> Cc: Pete Zaitcev <zaitcev@xxxxxxxxxx> Cc: Greg KH <greg@xxxxxxxxx> Reviewed-by: Rik van Riel <riel@xxxxxxxxxx> Signed-off-by: Fengguang Wu <wfg@xxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- diff -puN mm/page-writeback.c~writeback-remove-unnecessary-wait-in-throttle_vm_writeout mm/page-writeback.c --- a/mm/page-writeback.c~writeback-remove-unnecessary-wait-in-throttle_vm_writeout +++ a/mm/page-writeback.c @@ -502,16 +502,6 @@ void throttle_vm_writeout(gfp_t gfp_mask long background_thresh; long dirty_thresh; - if ((gfp_mask & (__GFP_FS|__GFP_IO)) != (__GFP_FS|__GFP_IO)) { - /* - * The caller might hold locks which can prevent IO completion - * or progress in the filesystem. So we cannot just sit here - * waiting for IO to complete. - */ - congestion_wait(WRITE, HZ/10); - return; - } - for ( ; ; ) { get_dirty_limits(&background_thresh, &dirty_thresh, NULL, NULL); @@ -525,6 +515,14 @@ void throttle_vm_writeout(gfp_t gfp_mask global_page_state(NR_WRITEBACK) <= dirty_thresh) break; congestion_wait(WRITE, HZ/10); + + /* + * The caller might hold locks which can prevent IO completion + * or progress in the filesystem. So we cannot just sit here + * waiting for IO to complete. + */ + if ((gfp_mask & (__GFP_FS|__GFP_IO)) != (__GFP_FS|__GFP_IO)) + break; } } _ Patches currently in -mm which might be from wfg@xxxxxxxxxxxxxxxx are readahead-compacting-file_ra_state.patch readahead-mmap-read-around-simplification.patch readahead-combine-file_ra_stateprev_index-prev_offset-into-prev_pos.patch readahead-combine-file_ra_stateprev_index-prev_offset-into-prev_pos-fix.patch readahead-combine-file_ra_stateprev_index-prev_offset-into-prev_pos-fix-2.patch radixtree-introduce-radix_tree_next_hole.patch readahead-basic-support-of-interleaved-reads.patch readahead-remove-the-local-copy-of-ra-in-do_generic_mapping_read.patch readahead-remove-several-readahead-macros.patch readahead-remove-the-limit-max_sectors_kb-imposed-on-max_readahead_kb.patch filemap-trivial-code-cleanups.patch filemap-convert-some-unsigned-long-to-pgoff_t.patch make-swappiness-safer-to-use.patch maps-pssproportional-set-size-accounting-in-smaps.patch convert-ill-defined-log2-to-ilog2.patch seqfile-merge-duplite-code-to-seq_open_private.patch avoid-negative-and-full-width-shifts-in-radix-treec.patch writeback-remove-unnecessary-wait-in-throttle_vm_writeout.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html