Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/writeback

* 'urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/writeback:
squeeze max-pause area and drop pass-good area

+2 -24
-11
include/linux/writeback.h
··· 12 12 * 13 13 * (thresh - thresh/DIRTY_FULL_SCOPE, thresh) 14 14 * 15 - * The 1/16 region above the global dirty limit will be put to maximum pauses: 16 - * 17 - * (limit, limit + limit/DIRTY_MAXPAUSE_AREA) 18 - * 19 - * The 1/16 region above the max-pause region, dirty exceeded bdi's will be put 20 - * to loops: 21 - * 22 - * (limit + limit/DIRTY_MAXPAUSE_AREA, limit + limit/DIRTY_PASSGOOD_AREA) 23 - * 24 15 * Further beyond, all dirtier tasks will enter a loop waiting (possibly long 25 16 * time) for the dirty pages to drop, unless written enough pages. 26 17 * ··· 22 31 */ 23 32 #define DIRTY_SCOPE 8 24 33 #define DIRTY_FULL_SCOPE (DIRTY_SCOPE / 2) 25 - #define DIRTY_MAXPAUSE_AREA 16 26 - #define DIRTY_PASSGOOD_AREA 8 27 34 28 35 /* 29 36 * 4MB minimal write chunk size
+2 -13
mm/page-writeback.c
··· 754 754 * 200ms is typically more than enough to curb heavy dirtiers; 755 755 * (b) the pause time limit makes the dirtiers more responsive. 756 756 */ 757 - if (nr_dirty < dirty_thresh + 758 - dirty_thresh / DIRTY_MAXPAUSE_AREA && 757 + if (nr_dirty < dirty_thresh && 758 + bdi_dirty < (task_bdi_thresh + bdi_thresh) / 2 && 759 759 time_after(jiffies, start_time + MAX_PAUSE)) 760 - break; 761 - /* 762 - * pass-good area. When some bdi gets blocked (eg. NFS server 763 - * not responding), or write bandwidth dropped dramatically due 764 - * to concurrent reads, or dirty threshold suddenly dropped and 765 - * the dirty pages cannot be brought down anytime soon (eg. on 766 - * slow USB stick), at least let go of the good bdi's. 767 - */ 768 - if (nr_dirty < dirty_thresh + 769 - dirty_thresh / DIRTY_PASSGOOD_AREA && 770 - bdi_dirty < bdi_thresh) 771 760 break; 772 761 773 762 /*