[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20110728234407.5B7032403FF@tassilo.jf.intel.com>
Date: Thu, 28 Jul 2011 16:44:07 -0700 (PDT)
From: Andi Kleen <andi@...stfloor.org>
To: peterz@...radead.org, fengguang.wu@...el.com, miklos@...redi.hu,
akpm@...ux-foundation.org, torvalds@...ux-foundation.org,
ak@...ux.intel.com, linux-kernel@...r.kernel.org,
stable@...nel.org, tim.bird@...sony.com
Subject: [PATCH] [3/50] mm/backing-dev.c: reset bdi min_ratio in bdi_unregister()
2.6.35-longterm review patch. If anyone has any objections, please let me know.
------------------
From: Peter Zijlstra <peterz@...radead.org>
[ upstream commit ccb6108f5b0b541d3eb332c3a73e645c0f84278e ]
Vito said:
: The system has many usb disks coming and going day to day, with their
: respective bdi's having min_ratio set to 1 when inserted. It works for
: some time until eventually min_ratio can no longer be set, even when the
: active set of bdi's seen in /sys/class/bdi/*/min_ratio doesn't add up to
: anywhere near 100.
:
: This then leads to an unrelated starvation problem caused by write-heavy
: fuse mounts being used atop the usb disks, a problem the min_ratio setting
: at the underlying devices bdi effectively prevents.
Fix this leakage by resetting the bdi min_ratio when unregistering the
BDI.
Signed-off-by: Peter Zijlstra <peterz@...radead.org>
Reported-by: Vito Caputo <lkml@...garu.com>
Cc: Wu Fengguang <fengguang.wu@...el.com>
Cc: Miklos Szeredi <miklos@...redi.hu>
Cc: <stable@...nel.org>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@...ux-foundation.org>
Signed-off-by: Andi Kleen <ak@...ux.intel.com>
Index: linux-2.6.35.y/mm/backing-dev.c
===================================================================
--- linux-2.6.35.y.orig/mm/backing-dev.c
+++ linux-2.6.35.y/mm/backing-dev.c
@@ -646,6 +646,7 @@ static void bdi_prune_sb(struct backing_
void bdi_unregister(struct backing_dev_info *bdi)
{
if (bdi->dev) {
+ bdi_set_min_ratio(bdi, 0);
bdi_prune_sb(bdi);
if (!bdi_cap_flush_forker(bdi))
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists