diff options
| author | Wei Yang <richard.weiyang@gmail.com> | 2018-12-28 03:34:36 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-12-28 15:11:47 -0500 |
| commit | 8b09549c2bfd9f3f8f4cdad74107ef4f4ff9cdd7 (patch) | |
| tree | 4e3ea82e6fc73c3796107038877fa3fb4df4f3a3 /include/linux/swap.h | |
| parent | 476567e8735a0d06225f3873a86dfa0efd95f3a5 (diff) | |
vmscan: return NODE_RECLAIM_NOSCAN in node_reclaim() when CONFIG_NUMA is n
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>
Diffstat (limited to 'include/linux/swap.h')
| -rw-r--r-- | include/linux/swap.h | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/include/linux/swap.h b/include/linux/swap.h index 77459d695010..f9e576a2c188 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
| @@ -359,14 +359,8 @@ extern unsigned long vm_total_pages; | |||
| 359 | extern int node_reclaim_mode; | 359 | extern int node_reclaim_mode; |
| 360 | extern int sysctl_min_unmapped_ratio; | 360 | extern int sysctl_min_unmapped_ratio; |
| 361 | extern int sysctl_min_slab_ratio; | 361 | extern int sysctl_min_slab_ratio; |
| 362 | extern int node_reclaim(struct pglist_data *, gfp_t, unsigned int); | ||
| 363 | #else | 362 | #else |
| 364 | #define node_reclaim_mode 0 | 363 | #define node_reclaim_mode 0 |
| 365 | static inline int node_reclaim(struct pglist_data *pgdat, gfp_t mask, | ||
| 366 | unsigned int order) | ||
| 367 | { | ||
| 368 | return 0; | ||
| 369 | } | ||
| 370 | #endif | 364 | #endif |
| 371 | 365 | ||
| 372 | extern int page_evictable(struct page *page); | 366 | extern int page_evictable(struct page *page); |
