linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] vmscan: return NODE_RECLAIM_NOSCAN in node_reclaim() when CONFIG_NUMA is n
@ 2018-11-13  4:17 Wei Yang
  2018-11-13  5:36 ` Matthew Wilcox
  2018-11-13  8:04 ` [PATCH v2] " Wei Yang
  0 siblings, 2 replies; 9+ messages in thread
From: Wei Yang @ 2018-11-13  4:17 UTC (permalink / raw)
  To: akpm, mgorman; +Cc: linux-mm, linux-kernel, Wei Yang

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 fix the return value by adjusting to NODE_RECLAIM_NOSCAN. Since
it is not proper to include "mm/internal.h", just hard coded it.

Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
---

This doesn't effect the system functionally. I am not sure we need to cc to
stable tree?

---
 include/linux/swap.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/swap.h b/include/linux/swap.h
index d8a07a4f171d..2bd993280470 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -364,7 +364,7 @@ extern int node_reclaim(struct pglist_data *, gfp_t, unsigned int);
 static inline int node_reclaim(struct pglist_data *pgdat, gfp_t mask,
 				unsigned int order)
 {
-	return 0;
+	return -2;	/* NODE_RECLAIM_NOSCAN */
 }
 #endif
 
-- 
2.15.1


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

end of thread, other threads:[~2018-11-13 13:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-13  4:17 [PATCH] vmscan: return NODE_RECLAIM_NOSCAN in node_reclaim() when CONFIG_NUMA is n Wei Yang
2018-11-13  5:36 ` Matthew Wilcox
2018-11-13  7:49   ` Wei Yang
2018-11-13  8:04 ` [PATCH v2] " Wei Yang
2018-11-13 12:56   ` Michal Hocko
2018-11-13 13:18     ` Wei Yang
2018-11-13 13:04   ` Matthew Wilcox
2018-11-13 13:18     ` Wei Yang
2018-11-13 13:32   ` Matthew Wilcox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).