Commit 28191624 authored by Kefeng Wang's avatar Kefeng Wang Committed by Peng Zhang
Browse files

mm: remove xchg_page_access_time()

mainline inclusion
from mainline-v6.7-rc1
commit f393084382fa3bbd5840b428d538dbcb33be0186
category: other
bugzilla: https://gitee.com/openeuler/kernel/issues/I8JQWQ

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f393084382fa3bbd5840b428d538dbcb33be0186

--------------------------------

Since all calls use folio_xchg_access_time(), remove
xchg_page_access_time().

Link: https://lkml.kernel.org/r/20231018140806.2783514-12-wangkefeng.wang@huawei.com


Signed-off-by: default avatarKefeng Wang <wangkefeng.wang@huawei.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Huang Ying <ying.huang@intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Juri Lelli <juri.lelli@redhat.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Zi Yan <ziy@nvidia.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarZhangPeng <zhangpeng362@huawei.com>
parent b2f828fc
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -1713,11 +1713,12 @@ static inline void page_cpupid_reset_last(struct page *page)
}
#endif /* LAST_CPUPID_NOT_IN_PAGE_FLAGS */

static inline int xchg_page_access_time(struct page *page, int time)
static inline int folio_xchg_access_time(struct folio *folio, int time)
{
	int last_time;

	last_time = page_cpupid_xchg_last(page, time >> PAGE_ACCESS_TIME_BUCKETS);
	last_time = page_cpupid_xchg_last(&folio->page,
					  time >> PAGE_ACCESS_TIME_BUCKETS);
	return last_time << PAGE_ACCESS_TIME_BUCKETS;
}

@@ -1736,7 +1737,7 @@ static inline int page_cpupid_xchg_last(struct page *page, int cpupid)
	return page_to_nid(page); /* XXX */
}

static inline int xchg_page_access_time(struct page *page, int time)
static inline int folio_xchg_access_time(struct folio *folio, int time)
{
	return 0;
}
@@ -1785,11 +1786,6 @@ static inline void vma_set_access_pid_bit(struct vm_area_struct *vma)
}
#endif /* CONFIG_NUMA_BALANCING */

static inline int folio_xchg_access_time(struct folio *folio, int time)
{
	return xchg_page_access_time(&folio->page, time);
}

#if defined(CONFIG_KASAN_SW_TAGS) || defined(CONFIG_KASAN_HW_TAGS)

/*