]> git.baikalelectronics.ru Git - kernel.git/commit
memcontrol: schedule throttling if we are congested
authorTejun Heo <tj@kernel.org>
Tue, 3 Jul 2018 15:14:56 +0000 (11:14 -0400)
committerJens Axboe <axboe@kernel.dk>
Mon, 9 Jul 2018 15:07:54 +0000 (09:07 -0600)
commitcb276eada88018a4715efa49a9c54d3a027ddb03
treed2e61e78a5dce7925bebb7c50d345838aa948b4a
parent12b1a65e66219efa27c18228e14c270e62eab286
memcontrol: schedule throttling if we are congested

Memory allocations can induce swapping via kswapd or direct reclaim.  If
we are having IO done for us by kswapd and don't actually go into direct
reclaim we may never get scheduled for throttling.  So instead check to
see if our cgroup is congested, and if so schedule the throttling.
Before we return to user space the throttling stuff will only throttle
if we actually required it.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Josef Bacik <jbacik@fb.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/memcontrol.h
include/linux/swap.h
mm/huge_memory.c
mm/memcontrol.c
mm/memory.c
mm/shmem.c
mm/swapfile.c