linux/include
Tejun Heo e8a7abf5a5 writeback: disassociate inodes from dying bdi_writebacks
For the purpose of foreign inode detection, wb's (bdi_writeback's) are
identified by the associated memcg ID.  As we create a separate wb for
each memcg, this is enough to identify the active wb's; however, when
blkcg is enabled or disabled higher up in the hierarchy, the mapping
between memcg and blkcg changes which in turn creates a new wb to
service the new mapping.  The old wb is unlinked from index and
released after all references are drained.  The foreign inode
detection logic can't detect this condition because both the old and
new wb's point to the same memcg and thus never decides to move inodes
attached to the old wb to the new one.

This patch adds logic to initiate switching immediately in
wbc_attach_and_unlock_inode() if the associated wb is dying.  We can
make the usual foreign detection logic to distinguish the different
wb's mapped to the memcg but the dying wb is never gonna be in active
service again and there's no point in tracking the usage history and
reaching the switch verdict after enough data points are collected.
It's already known that the wb has to be switched.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Jan Kara <jack@suse.cz>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Cc: Greg Thelen <gthelen@google.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
2015-06-02 08:40:20 -06:00
..
acpi ACPICA: remove duplicate u8 typedef 2015-04-28 23:58:54 +02:00
asm-generic TTY/Serial patches for 4.1-rc1 2015-04-21 09:33:10 -07:00
clocksource
crypto Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2015-04-15 10:42:15 -07:00
drm Merge tag 'topic/drm-misc-2015-04-15' of git://anongit.freedesktop.org/drm-intel into drm-next 2015-04-16 08:34:24 +10:00
dt-bindings Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma 2015-04-24 09:49:37 -07:00
keys
kvm KVM/ARM changes for v4.1: 2015-04-07 18:09:20 +02:00
linux writeback: disassociate inodes from dying bdi_writebacks 2015-06-02 08:40:20 -06:00
math-emu
media Merge branch 'patchwork' into v4l_for_linus 2015-04-21 06:12:35 -03:00
memory
misc
net net/bonding: Make DRV macros private 2015-04-26 22:59:53 -04:00
pcmcia
ras
rdma
rxrpc RxRPC: Handle VERSION Rx protocol packets 2015-04-01 16:31:26 +01:00
scsi SCSI: add 1024 max sectors black list flag 2015-04-27 09:38:06 -07:00
soc pm: at91: Workaround DDRSDRC self-refresh bug with LPDDR1 memories. 2015-03-03 19:43:59 +01:00
sound ASoC: Fixes for v4.1 2015-04-30 19:08:06 +02:00
target Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2015-04-24 10:22:09 -07:00
trace writeback: move global_dirty_limit into wb_domain 2015-06-02 08:38:12 -06:00
uapi nbd: stop using req->cmd 2015-05-05 13:40:44 -06:00
video fbdev changes for v4.1 2015-04-20 15:16:25 -07:00
xen xenbus_client: Extend interface to support multi-page ring 2015-04-15 10:56:47 +01:00
Kbuild