[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250113093453.1932083-8-kirill.shutemov@linux.intel.com>
Date: Mon, 13 Jan 2025 11:34:52 +0200
From: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
"Matthew Wilcox (Oracle)" <willy@...radead.org>,
Jens Axboe <axboe@...nel.dk>
Cc: "Jason A. Donenfeld" <Jason@...c4.com>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Andi Shyti <andi.shyti@...ux.intel.com>,
Chengming Zhou <chengming.zhou@...ux.dev>,
Christian Brauner <brauner@...nel.org>,
Christophe Leroy <christophe.leroy@...roup.eu>,
Dan Carpenter <dan.carpenter@...aro.org>,
David Airlie <airlied@...il.com>,
David Hildenbrand <david@...hat.com>,
Hao Ge <gehao@...inos.cn>,
Jani Nikula <jani.nikula@...ux.intel.com>,
Johannes Weiner <hannes@...xchg.org>,
Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
Josef Bacik <josef@...icpanda.com>,
Masami Hiramatsu <mhiramat@...nel.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Miklos Szeredi <miklos@...redi.hu>,
Nhat Pham <nphamcs@...il.com>,
Oscar Salvador <osalvador@...e.de>,
Ran Xiaokai <ran.xiaokai@....com.cn>,
Rodrigo Vivi <rodrigo.vivi@...el.com>,
Simona Vetter <simona@...ll.ch>,
Steven Rostedt <rostedt@...dmis.org>,
Tvrtko Ursulin <tursulin@...ulin.net>,
Vlastimil Babka <vbabka@...e.cz>,
Yosry Ahmed <yosryahmed@...gle.com>,
Yu Zhao <yuzhao@...gle.com>,
intel-gfx@...ts.freedesktop.org,
dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org,
linux-fsdevel@...r.kernel.org,
linux-mm@...ck.org,
linux-trace-kernel@...r.kernel.org
Subject: [PATCH 7/8] mm/mglru: Check PG_dropcache instead of PG_reclaim in lru_gen_folio_seq()
Kernel sets PG_dropcache instead of PG_reclaim everywhere. Check
PG_dropcache in lru_gen_folio_seq().
No need to check for dirty and writeback as there's no conflict with
PG_readahead anymore.
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@...ux.intel.com>
---
include/linux/mm_inline.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h
index f9157a0c42a5..f353d3c610ac 100644
--- a/include/linux/mm_inline.h
+++ b/include/linux/mm_inline.h
@@ -241,8 +241,7 @@ static inline unsigned long lru_gen_folio_seq(struct lruvec *lruvec, struct foli
else if (reclaiming)
gen = MAX_NR_GENS;
else if ((!folio_is_file_lru(folio) && !folio_test_swapcache(folio)) ||
- (folio_test_reclaim(folio) &&
- (folio_test_dirty(folio) || folio_test_writeback(folio))))
+ folio_test_dropbehind(folio))
gen = MIN_NR_GENS;
else
gen = MAX_NR_GENS - folio_test_workingset(folio);
--
2.45.2
Powered by blists - more mailing lists