mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [merged] mm-writeback-flush-plugged-io-in-wakeup_flusher_threads.patch removed from -mm tree
@ 2016-08-15 20:40 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2016-08-15 20:40 UTC (permalink / raw)
  To: khlebnikov, axboe, dchinner, mgorman, mhocko, tj, mm-commits


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@yandex-team.ru>
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@yandex-team.ru>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Dave Chinner <dchinner@redhat.com>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 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@yandex-team.ru are

kernel-watchdog-use-nmi-registers-snapshot-in-hardlockup-handler.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-08-15 20:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-15 20:40 [merged] mm-writeback-flush-plugged-io-in-wakeup_flusher_threads.patch removed from -mm tree akpm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).