Demoting cold folios to slower memory tiers using standard stores
pollutes CPU caches and incurs memory latency and bandwidth overhead.

Update demote_folio_list() to use MIGRATE_ASYNC_NONTEMPORAL, avoiding
CPU cache allocation and improving demotion throughput.

Suggested-by: Alirad Malek <[email protected]>
Suggested-by: Dimitrios Palyvos-Giannas <[email protected]>
Signed-off-by: Huan Nguyen <[email protected]>
---
 mm/vmscan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 9959ca158ce8..b44b7cdf8a03 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1134,7 +1134,7 @@ static unsigned int demote_folio_list(struct list_head 
*demote_folios,
 
        /* Demotion ignores all cpuset and mempolicy settings */
        migrate_pages(demote_folios, alloc_demote_folio, NULL,
-                     (unsigned long)&mtc, MIGRATE_ASYNC, MR_DEMOTION,
+                     (unsigned long)&mtc, MIGRATE_ASYNC_NONTEMPORAL, 
MR_DEMOTION,
                      &nr_succeeded);
 
        return nr_succeeded;
-- 
2.56.0.398.g882cbad275-goog


Reply via email to