summaryrefslogtreecommitdiff
path: root/ipc/compat_mq.c
diff options
context:
space:
mode:
authorVlastimil Babka <vbabka@suse.cz>2016-07-29 01:49:13 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2016-07-29 02:07:41 +0300
commit31a6c1909f51dbe9bf08eb40dc64e3db90cf6f79 (patch)
tree7adc87cfa64bdd01e308be5dfc2e7b65f84a17db /ipc/compat_mq.c
parent87cc271d5e4320d705cfdf59f68d4d037b3511b2 (diff)
downloadlinux-31a6c1909f51dbe9bf08eb40dc64e3db90cf6f79.tar.xz
mm, page_alloc: set alloc_flags only once in slowpath
In __alloc_pages_slowpath(), alloc_flags doesn't change after it's initialized, so move the initialization above the retry: label. Also make the comment above the initialization more descriptive. The only exception in the alloc_flags being constant is ALLOC_NO_WATERMARKS, which may change due to TIF_MEMDIE being set on the allocating thread. We can fix this, and make the code simpler and a bit more effective at the same time, by moving the part that determines ALLOC_NO_WATERMARKS from gfp_to_alloc_flags() to gfp_pfmemalloc_allowed(). This means we don't have to mask out ALLOC_NO_WATERMARKS in numerous places in __alloc_pages_slowpath() anymore. The only two tests for the flag can instead call gfp_pfmemalloc_allowed(). Link: http://lkml.kernel.org/r/20160721073614.24395-3-vbabka@suse.cz Signed-off-by: Vlastimil Babka <vbabka@suse.cz> Acked-by: Michal Hocko <mhocko@suse.com> Acked-by: Mel Gorman <mgorman@techsingularity.net> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'ipc/compat_mq.c')
0 files changed, 0 insertions, 0 deletions