Skip to content

Commit 737fb31

Browse files
author
Rafael Aquini
committed
memory tiering: count PGPROMOTE_SUCCESS when mem tiering is enabled.
JIRA: https://issues.redhat.com/browse/RHEL-84184 Conflicts: * context differences from upstream due to RHEL-9 missing commit 7262f20 ("mm/migrate: split source folio if it is on deferred split list") and its follow-up fix commit 6e49019 ("mm/migrate: putback split folios when numa hint migration fails"), with none of them being relevant to this backport This patch is a backport of the following upstream commit: commit ac59a1f Author: Zi Yan <ziy@nvidia.com> Date: Wed Jul 24 09:01:15 2024 -0400 memory tiering: count PGPROMOTE_SUCCESS when mem tiering is enabled. memory tiering can be enabled/disabled at runtime and sysctl_numa_balancing_mode & NUMA_BALANCING_MEMORY_TIERING is used to check it. In migrate_misplaced_folio(), the check is missing when PGPROMOTE_SUCCESS is incremented. Add the missing check. Link: https://lkml.kernel.org/r/20240724130115.793641-4-ziy@nvidia.com Fixes: 3302453 ("memory tiering: hot page selection with hint page fault latency") Reported-by: Kefeng Wang <wangkefeng.wang@huawei.com> Closes: https://lore.kernel.org/linux-mm/f4ae2c9c-fe40-4807-bdb2-64cf2d716c1a@huawei.com/ Signed-off-by: Zi Yan <ziy@nvidia.com> Acked-by: David Hildenbrand <david@redhat.com> Reviewed-by: Kefeng Wang <wangkefeng.wang@huawei.com> Cc: Baolin Wang <baolin.wang@linux.alibaba.com> Cc: "Huang, Ying" <ying.huang@intel.com> Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Rafael Aquini <raquini@redhat.com>
1 parent 2118172 commit 737fb31

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mm/migrate.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2600,7 +2600,9 @@ int migrate_misplaced_folio(struct folio *folio, struct vm_area_struct *vma,
26002600
}
26012601
if (nr_succeeded) {
26022602
count_vm_numa_events(NUMA_PAGE_MIGRATE, nr_succeeded);
2603-
if (!node_is_toptier(folio_nid(folio)) && node_is_toptier(node))
2603+
if ((sysctl_numa_balancing_mode & NUMA_BALANCING_MEMORY_TIERING)
2604+
&& !node_is_toptier(folio_nid(folio))
2605+
&& node_is_toptier(node))
26042606
mod_node_page_state(pgdat, PGPROMOTE_SUCCESS,
26052607
nr_succeeded);
26062608
}

0 commit comments

Comments
 (0)