summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorWei Yang <richard.weiyang@gmail.com>2018-12-28 00:34:36 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-12-05 09:20:57 +0100
commit78ce155fb8036cb61b245727d6ee2cdd327cfd47 (patch)
tree8c95364a9da29ab442a838cac9fd849113be6168 /mm
parent1b0e201c754421254e3cdb7d5e3de5e693deebb4 (diff)
downloadlinux-stable-78ce155fb8036cb61b245727d6ee2cdd327cfd47.tar.gz
linux-stable-78ce155fb8036cb61b245727d6ee2cdd327cfd47.tar.bz2
linux-stable-78ce155fb8036cb61b245727d6ee2cdd327cfd47.zip
vmscan: return NODE_RECLAIM_NOSCAN in node_reclaim() when CONFIG_NUMA is n
[ Upstream commit 8b09549c2bfd9f3f8f4cdad74107ef4f4ff9cdd7 ] Commit fa5e084e43eb ("vmscan: do not unconditionally treat zones that fail zone_reclaim() as full") changed the return value of node_reclaim(). The original return value 0 means NODE_RECLAIM_SOME after this commit. While the return value of node_reclaim() when CONFIG_NUMA is n is not changed. This will leads to call zone_watermark_ok() again. This patch fixes the return value by adjusting to NODE_RECLAIM_NOSCAN. Since node_reclaim() is only called in page_alloc.c, move it to mm/internal.h. Link: http://lkml.kernel.org/r/20181113080436.22078-1-richard.weiyang@gmail.com Signed-off-by: Wei Yang <richard.weiyang@gmail.com> Acked-by: Michal Hocko <mhocko@suse.com> Reviewed-by: Matthew Wilcox <willy@infradead.org> Cc: Mel Gorman <mgorman@techsingularity.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/internal.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/mm/internal.h b/mm/internal.h
index 87256ae1bef8..397183c8fe47 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -444,6 +444,16 @@ static inline void mminit_validate_memmodel_limits(unsigned long *start_pfn,
#define NODE_RECLAIM_SOME 0
#define NODE_RECLAIM_SUCCESS 1
+#ifdef CONFIG_NUMA
+extern int node_reclaim(struct pglist_data *, gfp_t, unsigned int);
+#else
+static inline int node_reclaim(struct pglist_data *pgdat, gfp_t mask,
+ unsigned int order)
+{
+ return NODE_RECLAIM_NOSCAN;
+}
+#endif
+
extern int hwpoison_filter(struct page *p);
extern u32 hwpoison_filter_dev_major;