mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-16 12:14:06 +00:00
mm: io_uring: allow oom-killer from io_uring_setup
[ Upstream commit 0a3f1e0bea
]
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>
This commit is contained in:
parent
51840feabe
commit
7adb4ba60e
1 changed files with 2 additions and 3 deletions
|
@ -8820,10 +8820,9 @@ static void io_mem_free(void *ptr)
|
|||
|
||||
static void *io_mem_alloc(size_t size)
|
||||
{
|
||||
gfp_t gfp_flags = GFP_KERNEL | __GFP_ZERO | __GFP_NOWARN | __GFP_COMP |
|
||||
__GFP_NORETRY | __GFP_ACCOUNT;
|
||||
gfp_t gfp = GFP_KERNEL_ACCOUNT | __GFP_ZERO | __GFP_NOWARN | __GFP_COMP;
|
||||
|
||||
return (void *) __get_free_pages(gfp_flags, get_order(size));
|
||||
return (void *) __get_free_pages(gfp, get_order(size));
|
||||
}
|
||||
|
||||
static unsigned long rings_size(unsigned sq_entries, unsigned cq_entries,
|
||||
|
|
Loading…
Add table
Reference in a new issue