mm/backing-dev.c: reset bdi min_ratio in bdi_unregister()
commit6b1ffd2fa340aca8687ec0d1795c0be19f72a29c
authorPeter Zijlstra <peterz@infradead.org>
Tue, 26 Jul 2011 00:11:57 +0000 (25 17:11 -0700)
committerAndi Kleen <ak@linux.intel.com>
Mon, 1 Aug 2011 20:55:00 +0000 (1 13:55 -0700)
treeacca5f62f39083a6e6ac11f12b735988263a1088
parent444442d989e4b1fe12527ffa0d94d582177194da
mm/backing-dev.c: reset bdi min_ratio in bdi_unregister()

[ 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@infradead.org>
Reported-by: Vito Caputo <lkml@pengaru.com>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
mm/backing-dev.c