[merged] mm-writeback-flush-plugged-io-in-wakeup_flusher_threads.patch removed from -mm tree

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

 



The patch titled
     Subject: mm, writeback: flush plugged IO in wakeup_flusher_threads()
has been removed from the -mm tree.  Its filename was
     mm-writeback-flush-plugged-io-in-wakeup_flusher_threads.patch

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

------------------------------------------------------
From: Konstantin Khlebnikov <khlebnikov@xxxxxxxxxxxxxx>
Subject: mm, writeback: flush plugged IO in wakeup_flusher_threads()

I've found funny livelock between raid10 barriers during resync and memory
controller hard limits.  Inside mpage_readpages() task holds on its plug
bio which blocks barrier in raid10.  Its memory cgroup have no free memory
thus task goes into reclaimer but all reclaimable pages are dirty and
cannot be written because raid10 is rebuilding and stuck on barrier.

Common flush of such IO in schedule() never happens because machine where
that happened has a lot of free cpus and task never goes sleep.

Lock is 'live' because changing memory limit or killing tasks which holds
that stuck bio unblock whole progress.

That was happened in 3.18.x but I see no difference in upstream logic.
Theoretically this might happen even without memory cgroup.

Link: http://lkml.kernel.org/r/147033576532.682609.2277943215598867297.stgit@buzz
Signed-off-by: Konstantin Khlebnikov <khlebnikov@xxxxxxxxxxxxxx>
Cc: Jens Axboe <axboe@xxxxxxxxx>
Cc: Michal Hocko <mhocko@xxxxxxxx>
Cc: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx>
Cc: Dave Chinner <dchinner@xxxxxxxxxx>
Cc: Tejun Heo <tj@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/fs-writeback.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff -puN fs/fs-writeback.c~mm-writeback-flush-plugged-io-in-wakeup_flusher_threads fs/fs-writeback.c
--- a/fs/fs-writeback.c~mm-writeback-flush-plugged-io-in-wakeup_flusher_threads
+++ a/fs/fs-writeback.c
@@ -1949,6 +1949,12 @@ void wakeup_flusher_threads(long nr_page
 {
 	struct backing_dev_info *bdi;
 
+	/*
+	 * If we are expecting writeback progress we must submit plugged IO.
+	 */
+	if (blk_needs_flush_plug(current))
+		blk_schedule_flush_plug(current);
+
 	if (!nr_pages)
 		nr_pages = get_nr_dirty_pages();
 
_

Patches currently in -mm which might be from khlebnikov@xxxxxxxxxxxxxx are

kernel-watchdog-use-nmi-registers-snapshot-in-hardlockup-handler.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