mm/slub: remove duplicate flag in allocate_slab()
Subsystems (2)
PATCH 1/1 mm/slub: remove duplicate flag in allocate_slab()
In allocate_slab(), __GFP_NOFAIL flag is removed twice when trying higher-order allocation. Remove it.
Signed-off-by Jiyoup Kim <[email protected]>
--- mm/slub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/slub.c +1 -1
@@ -1939,7 +1939,7 @@ static struct slab *allocate_slab(struct kmem_cache *s, gfp_t flags, int node)*/ alloc_gfp = (flags | __GFP_NOWARN | __GFP_NORETRY) & ~__GFP_NOFAIL;if ((alloc_gfp & __GFP_DIRECT_RECLAIM) &&oo_order (oo) >oo_order (s->min)) - alloc_gfp = (alloc_gfp | __GFP_NOMEMALLOC) & ~(__GFP_RECLAIM|__GFP_NOFAIL); + alloc_gfp = (alloc_gfp | __GFP_NOMEMALLOC) & ~__GFP_RECLAIM; slab =alloc_slab_page (alloc_gfp, node, oo);if (unlikely (!slab)) {
Signature · 1 line
2.25.1
Quoted 13 lines · Jiyoup Kim
In
allocate_slab(),__GFP_NOFAILflag is removed twice when trying higher-order allocation. Remove it.Signed-off-by Jiyoup Kim <[email protected]>--- mm/slub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)mm/slub.c +0
-0
mm/slub.c static struct slab *allocate_slab(struct kmem_cache *s, gfp_t flags, int node) · line 1945
Quoted 8 lines
mm/slub.c +1
-1@@ -1939,7 +1939,7 @@ static struct slab *allocate_slab(struct kmem_cache *s, gfp_t flags, int node)*/ alloc_gfp = (flags | __GFP_NOWARN | __GFP_NORETRY) & ~__GFP_NOFAIL;if ((alloc_gfp & __GFP_DIRECT_RECLAIM) &&oo_order (oo) >oo_order (s->min)) - alloc_gfp = (alloc_gfp | __GFP_NOMEMALLOC) & ~(__GFP_RECLAIM|__GFP_NOFAIL); + alloc_gfp = (alloc_gfp | __GFP_NOMEMALLOC) & ~__GFP_RECLAIM; slab =alloc_slab_page (alloc_gfp, node, oo);if (unlikely (!slab)) {
Looks good to me.
Reviewed-by Hyeonggon Yoo <[email protected]>
Thanks!
Quoted 4 lines
Signature · 1 line
2.25.1
Signature · 2 lines
Thanks, Hyeonggon
Quoted 4 lines · Jiyoup Kim
In
allocate_slab(),__GFP_NOFAILflag is removed twice when trying higher-order allocation. Remove it.Signed-off-by Jiyoup Kim <[email protected]>
LGTM.
Reviewed-by Muchun Song <[email protected]>
Quoted 4 lines · Jiyoup Kim
In
allocate_slab(),__GFP_NOFAILflag is removed twice when trying higher-order allocation. Remove it.Signed-off-by Jiyoup Kim <[email protected]>
Thanks, added.
Quoted 17 lines
--- mm/slub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)mm/slub.c +1
-1@@ -1939,7 +1939,7 @@ static struct slab *allocate_slab(struct kmem_cache *s, gfp_t flags, int node)*/ alloc_gfp = (flags | __GFP_NOWARN | __GFP_NORETRY) & ~__GFP_NOFAIL;if ((alloc_gfp & __GFP_DIRECT_RECLAIM) &&oo_order (oo) >oo_order (s->min)) - alloc_gfp = (alloc_gfp | __GFP_NOMEMALLOC) & ~(__GFP_RECLAIM|__GFP_NOFAIL); + alloc_gfp = (alloc_gfp | __GFP_NOMEMALLOC) & ~__GFP_RECLAIM; slab =alloc_slab_page (alloc_gfp, node, oo);if (unlikely (!slab)) {
Quoted 4 lines · Jiyoup Kim
In
allocate_slab(),__GFP_NOFAILflag is removed twice when trying higher-order allocation. Remove it.Signed-off-by Jiyoup Kim <[email protected]>
Acked-by David Rientjes <[email protected]>