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

mm: add folio_xchg_last_cpupid()

mainline inclusion
from mainline-v6.7-rc1
commit 136d0b47576f8701d68c2d504e7237d9fdc4ebbd
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=136d0b47576f8701d68c2d504e7237d9fdc4ebbd

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

Add folio_xchg_last_cpupid() wrapper, which is required to convert
page_cpupid_xchg_last() to folio vertion later in the series.

Link: https://lkml.kernel.org/r/20231018140806.2783514-13-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 28191624
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1786,6 +1786,11 @@ static inline void vma_set_access_pid_bit(struct vm_area_struct *vma)
}
#endif /* CONFIG_NUMA_BALANCING */

static inline int folio_xchg_last_cpupid(struct folio *folio, int cpupid)
{
	return page_cpupid_xchg_last(&folio->page, cpupid);
}

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

/*