lkml.org 
[lkml]   [2023]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] maple_tree: use GFP_KERNEL on mas_node_count
From
Date
Use GFP_KERNEL on mas_node_count instead of GFP_NOWAIT | __GFP_NOWARN
in order to allow memory reclaim.

Currently, fork errors occur on low free memory as follows:

Zygote : Failed to fork child process: Out of memory (12)

-ENOMEM was returned as following path:

mas_node_count
mas_expected_entries
dup_mmap
dup_mm
copy_mm
copy_process

Signed-off-by: jason.sim <jason.sim@samsung.com>
---
lib/maple_tree.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/maple_tree.c b/lib/maple_tree.c
index ee1ff0c59fd7..076798f83baa 100644
--- a/lib/maple_tree.c
+++ b/lib/maple_tree.c
@@ -1336,11 +1336,11 @@ static void mas_node_count_gfp(struct ma_state *mas, int count, gfp_t gfp)
* @mas: The maple state
* @count: The number of nodes needed
*
- * Note: Uses GFP_NOWAIT | __GFP_NOWARN for gfp flags.
+ * Note: Uses GFP_KERNEL for gfp flags.
*/
static void mas_node_count(struct ma_state *mas, int count)
{
- return mas_node_count_gfp(mas, count, GFP_NOWAIT | __GFP_NOWARN);
+ return mas_node_count_gfp(mas, count, GFP_KERNEL);
}

/*
--
2.17.1
\
 
 \ /
  Last update: 2023-09-07 05:39    [W:0.092 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site