diff options
| author | Zi Yan <ziy@nvidia.com> | 2024-07-24 09:01:14 -0400 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2024-09-01 20:25:47 -0700 |
| commit | 2a28713a67fd28eedc13b32300df6b9c5a2381f5 (patch) | |
| tree | b99b41c1317c28193490fe09ecbb5863edd34140 /kernel/sched | |
| parent | memory tiering: read last_cpupid correctly in do_huge_pmd_numa_page() (diff) | |
| download | linux-2a28713a67fd28eedc13b32300df6b9c5a2381f5.tar.gz linux-2a28713a67fd28eedc13b32300df6b9c5a2381f5.zip | |
memory tiering: introduce folio_use_access_time() check
If memory tiering mode is on and a folio is not in the top tier memory,
folio's cpupid field is repurposed to store page access time. Instead of
an open coded check, use a function to encapsulate the check.
Link: https://lkml.kernel.org/r/20240724130115.793641-3-ziy@nvidia.com
Signed-off-by: Zi Yan <ziy@nvidia.com>
Reviewed-by: "Huang, Ying" <ying.huang@intel.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: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'kernel/sched')
| -rw-r--r-- | kernel/sched/fair.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 9057584ec06d..416e29b56cc4 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -1840,8 +1840,7 @@ bool should_numa_migrate_memory(struct task_struct *p, struct folio *folio, * The pages in slow memory node should be migrated according * to hot/cold instead of private/shared. */ - if (sysctl_numa_balancing_mode & NUMA_BALANCING_MEMORY_TIERING && - !node_is_toptier(src_nid)) { + if (folio_use_access_time(folio)) { struct pglist_data *pgdat; unsigned long rate_limit; unsigned int latency, th, def_th; |
