linux-stable/include
Tejun Heo c2aa723a60 writeback: implement memcg writeback domain based throttling
While cgroup writeback support now connects memcg and blkcg so that
writeback IOs are properly attributed and controlled, the IO back
pressure propagation mechanism implemented in balance_dirty_pages()
and its subroutines wasn't aware of cgroup writeback.

Processes belonging to a memcg may have access to only subset of total
memory available in the system and not factoring this into dirty
throttling rendered it completely ineffective for processes under
memcg limits and memcg ended up building a separate ad-hoc degenerate
mechanism directly into vmscan code to limit page dirtying.

The previous patches updated balance_dirty_pages() and its subroutines
so that they can deal with multiple wb_domain's (writeback domains)
and defined per-memcg wb_domain.  Processes belonging to a non-root
memcg are bound to two wb_domains, global wb_domain and memcg
wb_domain, and should be throttled according to IO pressures from both
domains.  This patch updates dirty throttling code so that it repeats
similar calculations for the two domains - the differences between the
two are few and minor - and applies the lower of the two sets of
resulting constraints.

wb_over_bg_thresh(), which controls when background writeback
terminates, is also updated to consider both global and memcg
wb_domains.  It returns true if dirty is over bg_thresh for either
domain.

This makes the dirty throttling mechanism operational for memcg
domains including writeback-bandwidth-proportional dirty page
distribution inside them but the ad-hoc memcg throttling mechanism in
vmscan is still in place.  The next patch will rip it out.

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:38:13 -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
linux writeback: implement memcg writeback domain based throttling 2015-06-02 08:38:13 -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
scsi SCSI: add 1024 max sectors black list flag 2015-04-27 09:38:06 -07:00
soc
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