All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH] mm: have kswapd only reclaiming use min protection on memcg
@ 2021-10-27  7:01 Huangzhaoyang
  2021-10-27  7:20 ` Michal Hocko
  0 siblings, 1 reply; 10+ messages in thread
From: Huangzhaoyang @ 2021-10-27  7:01 UTC (permalink / raw)
  To: Andrew Morton, Johannes Weiner, Michal Hocko, Vladimir Davydov,
	Zhaoyang Huang, linux-mm, linux-kernel

From: Zhaoyang Huang <zhaoyang.huang@unisoc.com>

For the kswapd only reclaiming, there is no chance to try again on
this group while direct reclaim has. fix it by judging gfp flag.

Signed-off-by: Zhaoyang Huang <zhaoyang.huang@unisoc.com>
---
 mm/vmscan.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 74296c2..41f5776 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2704,7 +2704,8 @@ static void get_scan_count(struct lruvec *lruvec, struct scan_control *sc,
 			unsigned long protection;
 
 			/* memory.low scaling, make sure we retry before OOM */
-			if (!sc->memcg_low_reclaim && low > min) {
+			if (!sc->memcg_low_reclaim && low > min
+				&& sc->gfp_mask & __GFP_DIRECT_RECLAIM) {
 				protection = low;
 				sc->memcg_low_skipped = 1;
 			} else {
-- 
1.9.1


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

end of thread, other threads:[~2021-10-28  2:04 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-27  7:01 [RFC PATCH] mm: have kswapd only reclaiming use min protection on memcg Huangzhaoyang
2021-10-27  7:20 ` Michal Hocko
2021-10-27  7:46   ` Zhaoyang Huang
2021-10-27  8:26     ` Michal Hocko
2021-10-27  9:19       ` Zhaoyang Huang
2021-10-27 11:52         ` Michal Hocko
2021-10-27 12:05           ` Zhaoyang Huang
2021-10-27 12:31             ` Michal Hocko
2021-10-28  0:45               ` Zhaoyang Huang
2021-10-28  2:04                 ` Chris Down

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.