linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gfp: GFP_RECLAIM_MASK should include __GFP_NO_KSWAPD
@ 2015-10-14  5:36 Pan Xinhui
  2015-10-14  5:58 ` Pan Xinhui
  2015-10-14  7:34 ` Michal Hocko
  0 siblings, 2 replies; 8+ messages in thread
From: Pan Xinhui @ 2015-10-14  5:36 UTC (permalink / raw)
  To: linux-kernel, linux-mm
  Cc: Andrew Morton, vbabka, rientjes, hannes, mhocko, nasa4836,
	mgorman, alexander.h.duyck, aneesh.kumar, yanmin_zhang

From: Pan Xinhui <xinhuix.pan@intel.com>

GFP_RECLAIM_MASK was introduced in commit 6cb062296f73 ("Categorize GFP
flags"). In slub subsystem, this macro controls slub's allocation
behavior. In particular, some flags which are not in GFP_RECLAIM_MASK
will be cleared. So when slub pass this new gfp_flag into page
allocator, we might lost some very important flags.

There are some mistakes when we introduce __GFP_NO_KSWAPD. This flag is
used to avoid any scheduler-related codes recursive.  But it seems like
patch author forgot to add it into GFP_RECLAIM_MASK. So lets add it now.

Signed-off-by: Pan Xinhui <xinhuix.pan@intel.com>
---
 include/linux/gfp.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/linux/gfp.h b/include/linux/gfp.h
index f92cbd2..9ebad4d 100644
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -130,7 +130,8 @@ struct vm_area_struct;
 /* Control page allocator reclaim behavior */
 #define GFP_RECLAIM_MASK (__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_FS|\
 			__GFP_NOWARN|__GFP_REPEAT|__GFP_NOFAIL|\
-			__GFP_NORETRY|__GFP_MEMALLOC|__GFP_NOMEMALLOC)
+			__GFP_NORETRY|__GFP_MEMALLOC|__GFP_NOMEMALLOC|\
+			__GFP_NO_KSWAPD)
 
 /* Control slab gfp mask during early boot */
 #define GFP_BOOT_MASK (__GFP_BITS_MASK & ~(__GFP_WAIT|__GFP_IO|__GFP_FS))
-- 
1.9.1

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-10-14  8:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-14  5:36 [PATCH] gfp: GFP_RECLAIM_MASK should include __GFP_NO_KSWAPD Pan Xinhui
2015-10-14  5:58 ` Pan Xinhui
2015-10-14  7:41   ` Michal Hocko
2015-10-14  8:36     ` Pan Xinhui
2015-10-14  7:34 ` Michal Hocko
2015-10-14  8:17   ` Pan Xinhui
2015-10-14  8:38     ` Michal Hocko
2015-10-14  8:40       ` Pan Xinhui

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox