mm: io_uring: allow oom-killer from io_uring_setup
authorShakeel Butt <shakeelb@google.com>
Tue, 25 Jan 2022 05:17:36 +0000 (21:17 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Feb 2022 11:03:18 +0000 (12:03 +0100)
commit246dfbc12539808b024b4e53864fc494bde679b9
treeae2941dec69cf66f94fc59ac1a25ec680f506ffd
parent54d69f072d5e2a5fa165c838cfabf744a8c353d5
mm: io_uring: allow oom-killer from io_uring_setup

[ Upstream commit 0a3f1e0beacf6cc8ae5f846b0641c1df476e83d6 ]

On an overcommitted system which is running multiple workloads of
varying priorities, it is preferred to trigger an oom-killer to kill a
low priority workload than to let the high priority workload receiving
ENOMEMs. On our memory overcommitted systems, we are seeing a lot of
ENOMEMs instead of oom-kills because io_uring_setup callchain is using
__GFP_NORETRY gfp flag which avoids the oom-killer. Let's remove it and
allow the oom-killer to kill a lower priority job.

Signed-off-by: Shakeel Butt <shakeelb@google.com>
Link: https://lore.kernel.org/r/20220125051736.2981459-1-shakeelb@google.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/io_uring.c