mm: migrate LRU_REFS_MASK bits in folio_migrate_flags
authorZhaoyang Huang <zhaoyang.huang@unisoc.com>
Thu, 26 Sep 2024 05:06:47 +0000 (13:06 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 6 Nov 2024 00:56:29 +0000 (16:56 -0800)
commit473c371254d2c9906c286c939eaa99d0fac13e38
tree737db41c247be9c82c6976bf01e13cd3e7a8d8b9
parent583e66debd1d5aa8c401aebe924c7406e15579a7
mm: migrate LRU_REFS_MASK bits in folio_migrate_flags

Bits of LRU_REFS_MASK are not inherited during migration which lead to new
folio start from tier0 when MGLRU enabled.  Try to bring as much bits of
folio->flags as possible since compaction and alloc_contig_range which
introduce migration do happen at times.

Link: https://lkml.kernel.org/r/20240926050647.5653-1-zhaoyang.huang@unisoc.com
Signed-off-by: Zhaoyang Huang <zhaoyang.huang@unisoc.com>
Suggested-by: Yu Zhao <yuzhao@google.com>
Acked-by: David Hildenbrand <david@redhat.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Yu Zhao <yuzhao@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/mm_inline.h
mm/migrate.c