From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Andrew Morton <akpm@linux-foundation•org>
Cc: Catalin Marinas <catalin.marinas@arm•com>,
Will Deacon <will@kernel•org>,
Huang Ying <ying.huang@linux•alibaba.com>,
Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
Linux Next Mailing List <linux-next@vger•kernel.org>,
Lorenzo Stoakes <lorenzo.stoakes@oracle•com>,
"Huang, Ying" <ying.huang@linux•alibaba.com>
Subject: Re: linux-next: manual merge of the arm64 tree with the mm-unstable tree
Date: Thu, 4 Dec 2025 13:02:33 +1100 [thread overview]
Message-ID: <20251204130233.5a24b42c@canb.auug.org.au> (raw)
In-Reply-To: <20251120102532.670ba5b6@canb.auug.org.au>
[-- Attachment #1: Type: text/plain, Size: 3359 bytes --]
Hi all,
On Thu, 20 Nov 2025 10:25:32 +1100 Stephen Rothwell <sfr@canb•auug.org.au> wrote:
>
> Today's linux-next merge of the arm64 tree got a conflict in:
>
> mm/memory.c
>
> between commit:
>
> b08b123ead1a ("mm: avoid unnecessary use of is_swap_pmd()")
>
> from the mm-unstable tree and commit:
>
> 79301c7d605a ("mm: add spurious fault fixing support for huge pmd")
>
> from the arm64 tree.
>
> I fixed it up (I think - see below) and can carry the fix as
> necessary. This is now fixed as far as linux-next is concerned, but any
> non trivial conflicts should be mentioned to your upstream maintainer
> when your tree is submitted for merging. You may also want to consider
> cooperating with the maintainer of the conflicting tree to minimise any
> particularly complex conflicts.
>
>
> diff --cc mm/memory.c
> index 50b93b45b174,6e5a08c4fd2e..000000000000
> --- a/mm/memory.c
> +++ b/mm/memory.c
> @@@ -6342,40 -6314,37 +6369,43 @@@ retry_pud
> if (pmd_none(*vmf.pmd) &&
> thp_vma_allowable_order(vma, vm_flags, TVA_PAGEFAULT, PMD_ORDER)) {
> ret = create_huge_pmd(&vmf);
> - if (!(ret & VM_FAULT_FALLBACK))
> + if (ret & VM_FAULT_FALLBACK)
> + goto fallback;
> + else
> return ret;
> - } else {
> - vmf.orig_pmd = pmdp_get_lockless(vmf.pmd);
> + }
>
> - if (unlikely(is_swap_pmd(vmf.orig_pmd))) {
> - VM_BUG_ON(thp_migration_supported() &&
> - !is_pmd_migration_entry(vmf.orig_pmd));
> - if (is_pmd_migration_entry(vmf.orig_pmd))
> - pmd_migration_entry_wait(mm, vmf.pmd);
> + vmf.orig_pmd = pmdp_get_lockless(vmf.pmd);
> + if (pmd_none(vmf.orig_pmd))
> + goto fallback;
> +
> + if (unlikely(!pmd_present(vmf.orig_pmd))) {
> + if (pmd_is_device_private_entry(vmf.orig_pmd))
> + return do_huge_pmd_device_private(&vmf);
> +
> + if (pmd_is_migration_entry(vmf.orig_pmd))
> + pmd_migration_entry_wait(mm, vmf.pmd);
> + return 0;
> + }
> + if (pmd_trans_huge(vmf.orig_pmd)) {
> + if (pmd_protnone(vmf.orig_pmd) && vma_is_accessible(vma))
> + return do_huge_pmd_numa_page(&vmf);
> +
> + if ((flags & (FAULT_FLAG_WRITE|FAULT_FLAG_UNSHARE)) &&
> + !pmd_write(vmf.orig_pmd)) {
> + ret = wp_huge_pmd(&vmf);
> + if (!(ret & VM_FAULT_FALLBACK))
> + return ret;
> + } else {
> - huge_pmd_set_accessed(&vmf);
> ++ vmf.ptl = pmd_lock(mm, vmf.pmd);
> ++ if (!huge_pmd_set_accessed(&vmf))
> ++ fix_spurious_fault(&vmf, PGTABLE_LEVEL_PMD);
> ++ spin_unlock(vmf.ptl);
> return 0;
> }
> - if (pmd_trans_huge(vmf.orig_pmd)) {
> - if (pmd_protnone(vmf.orig_pmd) && vma_is_accessible(vma))
> - return do_huge_pmd_numa_page(&vmf);
> -
> - if ((flags & (FAULT_FLAG_WRITE|FAULT_FLAG_UNSHARE)) &&
> - !pmd_write(vmf.orig_pmd)) {
> - ret = wp_huge_pmd(&vmf);
> - if (!(ret & VM_FAULT_FALLBACK))
> - return ret;
> - } else {
> - vmf.ptl = pmd_lock(mm, vmf.pmd);
> - if (!huge_pmd_set_accessed(&vmf))
> - fix_spurious_fault(&vmf, PGTABLE_LEVEL_PMD);
> - spin_unlock(vmf.ptl);
> - return 0;
> - }
> - }
> }
>
> +fallback:
> return handle_pte_fault(&vmf);
> }
>
This is now a conflict between the mm-stable tree and Linus' tree.
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2025-12-04 2:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-19 23:25 linux-next: manual merge of the arm64 tree with the mm-unstable tree Stephen Rothwell
2025-11-20 1:36 ` Huang, Ying
2025-12-04 2:02 ` Stephen Rothwell [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-11-14 0:21 Stephen Rothwell
2025-12-04 2:00 ` Stephen Rothwell
2025-12-04 3:25 ` Anshuman Khandual
2025-12-04 5:56 ` Stephen Rothwell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251204130233.5a24b42c@canb.auug.org.au \
--to=sfr@canb$(echo .)auug.org.au \
--cc=akpm@linux-foundation$(echo .)org \
--cc=catalin.marinas@arm$(echo .)com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=lorenzo.stoakes@oracle$(echo .)com \
--cc=will@kernel$(echo .)org \
--cc=ying.huang@linux$(echo .)alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox