[PATCH OLK-6.6 v2 0/2] mm: Fix shmem build and numa fault counting errors
1. Fix CONFIG_SWAP build errors introduced by ed205f43 ("mm: convert swap_cluster_readahead and swap_vma_readahead to return a folio") 2. Fix numa fault counting error introduced by 3bfa35c ("mm/numa: no task_numa_fault() call if PTE is changed") v1 -> v2: - add inline for swap_cluster_readahead. - fix some commit message for checkformat. Ze Zuo (2): mm: fix shmem build errors with CONFIG_SWAP disable mm: fix nr_pages counting for folio in task_numa_fault mm/memory.c | 4 ++-- mm/swap.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) -- 2.25.1
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/ID6RU3 -------------------------------- Fix kernel build errors when CONFIG_SWAP is not enabled: 1. include/linux/migrate.h:102 - syntax error in stub function. 2. mm/shmem.c:1699 - function signature mismatch in swap_cluster_readahead(). Adjust the stub implementation of swap_cluster_readahead() to match the actual function signature (4 parameters), ensuring consistent function prototypes when CONFIG_SWAP is disabled. Fixes: ed205f43c85f ("mm: convert swap_cluster_readahead and swap_vma_readahead to return a folio") Signed-off-by: Ze Zuo <zuoze1@huawei.com> --- mm/swap.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/swap.h b/mm/swap.h index f4a557a753e2..0fd01502d792 100644 --- a/mm/swap.h +++ b/mm/swap.h @@ -107,8 +107,8 @@ static inline void show_swap_cache_info(void) { } -static inline struct folio *swap_cluster_readahead(swp_entry_t entry, - gfp_t gfp_mask, struct vm_fault *vmf) +static inline struct folio *swap_cluster_readahead(swp_entry_t entry, gfp_t flag, + struct mempolicy *mpol, pgoff_t ilx) { return NULL; } -- 2.25.1
hulk inclusion category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IC991N -------------------------------- Fix the page counting issue in task_numa_fault() call for folio-based NUMA fault handling. Change the page count parameter from 1 to nr_pages to correctly account for the actual number of pages in the folio involved in the NUMA fault. Fixes: 3bfa35ccde9e ("mm/numa: no task_numa_fault() call if PTE is changed") Signed-off-by: Ze Zuo <zuoze1@huawei.com> --- mm/memory.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/memory.c b/mm/memory.c index cafb6a3a66a4..5e677c1c8d24 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -5606,7 +5606,7 @@ static vm_fault_t do_numa_page(struct vm_fault *vmf) if (migrate_misplaced_folio(folio, vma, target_nid)) { nid = target_nid; flags |= TNF_MIGRATED; - task_numa_fault(last_cpupid, nid, 1, flags); + task_numa_fault(last_cpupid, nid, nr_pages, flags); return 0; } @@ -5633,7 +5633,7 @@ static vm_fault_t do_numa_page(struct vm_fault *vmf) pte_unmap_unlock(vmf->pte, vmf->ptl); if (nid != NUMA_NO_NODE) - task_numa_fault(last_cpupid, nid, 1, flags); + task_numa_fault(last_cpupid, nid, nr_pages, flags); return 0; } -- 2.25.1
反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/19009 邮件列表地址:https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/66X... FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/19009 Mailing list address: https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/66X...
participants (2)
-
patchwork bot -
Ze Zuo