diff options
author | Vlastimil Babka <vbabka@suse.cz> | 2016-07-28 15:49:13 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-07-28 16:07:41 -0700 |
commit | 31a6c1909f51dbe9bf08eb40dc64e3db90cf6f79 (patch) | |
tree | 7adc87cfa64bdd01e308be5dfc2e7b65f84a17db /.gitignore | |
parent | 87cc271d5e4320d705cfdf59f68d4d037b3511b2 (diff) | |
download | talos-op-linux-31a6c1909f51dbe9bf08eb40dc64e3db90cf6f79.tar.gz talos-op-linux-31a6c1909f51dbe9bf08eb40dc64e3db90cf6f79.zip |
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 '.gitignore')
0 files changed, 0 insertions, 0 deletions