[merged] writeback-change-of-dirty_writeback_interval-takes-effect-immediately.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: mm/page-writeback.c: make changes of dirty_writeback_centisecs take effect immediately
has been removed from the -mm tree.  Its filename was
     writeback-change-of-dirty_writeback_interval-takes-effect-immediately.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Yafang Shao <laoar.shao@xxxxxxxxx>
Subject: mm/page-writeback.c: make changes of dirty_writeback_centisecs take effect immediately

Two problems with /proc/sys/vm/dirty_writeback_centisecs:

- When the tunable is set to 0 (disable), writing a non-zero value
  doesn't restart the flushing operations until the dirty background limit
  is reached or sys_sync is executed or not enough free memory is
  available or vmscan is triggered.

- When the tunable was set to one hour and is reset to one second, the
  new setting will not take effect for up to one hour.

Kicking the flusher threads immediately fixes these issues.

Link: http://lkml.kernel.org/r/1507746016-15344-1-git-send-email-laoar.shao@xxxxxxxxx
Signed-off-by: Yafang Shao <laoar.shao@xxxxxxxxx>
Cc: Jan Kara <jack@xxxxxxx>
Cc: Jens Axboe <axboe@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/page-writeback.c |   15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff -puN mm/page-writeback.c~writeback-change-of-dirty_writeback_interval-takes-effect-immediately mm/page-writeback.c
--- a/mm/page-writeback.c~writeback-change-of-dirty_writeback_interval-takes-effect-immediately
+++ a/mm/page-writeback.c
@@ -1974,8 +1974,19 @@ bool wb_over_bg_thresh(struct bdi_writeb
 int dirty_writeback_centisecs_handler(struct ctl_table *table, int write,
 	void __user *buffer, size_t *length, loff_t *ppos)
 {
-	proc_dointvec(table, write, buffer, length, ppos);
-	return 0;
+	int ret = proc_dointvec(table, write, buffer, length, ppos);
+
+	/*
+	 * Writing 0 to dirty_writeback_interval will disable periodic writeback
+	 * and a different non-zero value will wakeup the writeback threads.
+	 * wb_wakeup_delayed() would be more appropriate, but it's a pain to
+	 * iterate over all bdis and wbs.
+	 * The reason we do this is to make the change take effect immediately.
+	 */
+	if (!ret && write && dirty_writeback_interval &&
+			dirty_writeback_interval != old_interval)
+		wakeup_flusher_threads(WB_REASON_PERIODIC);
+	return ret;
 }
 
 #ifdef CONFIG_BLOCK
_

Patches currently in -mm which might be from laoar.shao@xxxxxxxxx are

mm-print-a-warning-once-the-vm-dirtiness-settings-is-illogical.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



[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux