* [PATCH] mm/vmscan: use helper folio_is_file_lru()
@ 2022-04-28 10:58 Miaohe Lin
0 siblings, 0 replies; only message in thread
From: Miaohe Lin @ 2022-04-28 10:58 UTC (permalink / raw)
To: akpm; +Cc: linux-mm, linux-kernel, linmiaohe
Use helper folio_is_file_lru() to check whether folio is file lru. Minor
readability improvement.
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
Hi Andrew,
Please feel free to squash this into below patch:
https://lore.kernel.org/all/20220425111232.23182-7-linmiaohe@huawei.com/T/#u
Thanks!
---
mm/vmscan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/vmscan.c b/mm/vmscan.c
index ecd74858b8d7..9ff3cc2a941a 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1414,7 +1414,7 @@ static enum page_references folio_check_references(struct folio *folio,
/*
* Activate file-backed executable folios after first usage.
*/
- if ((vm_flags & VM_EXEC) && !folio_test_swapbacked(folio))
+ if ((vm_flags & VM_EXEC) && folio_is_file_lru(folio))
return PAGEREF_ACTIVATE;
return PAGEREF_KEEP;
--
2.23.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-04-28 10:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-28 10:58 [PATCH] mm/vmscan: use helper folio_is_file_lru() Miaohe Lin
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.