[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <52fcc0ec.10f1.190aa29ee98.Coremail.00107082@163.com>
Date: Sat, 13 Jul 2024 11:36:33 +0800 (CST)
From: "David Wang" <00107082@....com>
To: "Peter Xu" <peterx@...hat.com>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
"Andrew Morton" <akpm@...ux-foundation.org>,
"Alex Williamson" <alex.williamson@...hat.com>,
"Jason Gunthorpe" <jgg@...dia.com>,
"Al Viro" <viro@...iv.linux.org.uk>,
"Dave Hansen" <dave.hansen@...ux.intel.com>,
"Andy Lutomirski" <luto@...nel.org>,
"Peter Zijlstra" <peterz@...radead.org>,
"Thomas Gleixner" <tglx@...utronix.de>,
"Ingo Molnar" <mingo@...hat.com>, "Borislav Petkov" <bp@...en8.de>,
"Kirill A . Shutemov" <kirill@...temov.name>, x86@...nel.org,
"Yan Zhao" <yan.y.zhao@...el.com>,
"Kevin Tian" <kevin.tian@...el.com>, "Pei Li" <peili.dev@...il.com>,
"David Hildenbrand" <david@...hat.com>,
"Bert Karwatzki" <spasswolf@....de>,
"Sergey Senozhatsky" <senozhatsky@...omium.org>
Subject: Re:[PATCH] mm/x86/pat: Only untrack the pfn range if unmap region
Hi,
At 2024-07-12 22:42:44, "Peter Xu" <peterx@...hat.com> wrote:
>
>NOTE: I massaged the commit message comparing to the rfc post [1], the
>patch itself is untouched. Also removed rfc tag, and added more people
>into the loop. Please kindly help test this patch if you have a reproducer,
>as I can't reproduce it myself even with the syzbot reproducer on top of
>mm-unstable. Instead of further check on the reproducer, I decided to send
>this out first as we have a bunch of reproducers on the list now..
>---
> mm/memory.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
>diff --git a/mm/memory.c b/mm/memory.c
>index 4bcd79619574..f57cc304b318 100644
>--- a/mm/memory.c
>+++ b/mm/memory.c
>@@ -1827,9 +1827,6 @@ static void unmap_single_vma(struct mmu_gather *tlb,
> if (vma->vm_file)
> uprobe_munmap(vma, start, end);
>
>- if (unlikely(vma->vm_flags & VM_PFNMAP))
>- untrack_pfn(vma, 0, 0, mm_wr_locked);
>-
> if (start != end) {
> if (unlikely(is_vm_hugetlb_page(vma))) {
> /*
>@@ -1894,6 +1891,8 @@ void unmap_vmas(struct mmu_gather *tlb, struct ma_state *mas,
> unsigned long start = start_addr;
> unsigned long end = end_addr;
> hugetlb_zap_begin(vma, &start, &end);
>+ if (unlikely(vma->vm_flags & VM_PFNMAP))
>+ untrack_pfn(vma, 0, 0, mm_wr_locked);
> unmap_single_vma(tlb, vma, start, end, &details,
> mm_wr_locked);
> hugetlb_zap_end(vma, &details);
>--
>2.45.0
I apply this patch on 6.10.0-rc7, and confirmed that no kernel warning shows up when I suspend my system(with nvidia GPU),
After several round of suspend/resume cycle, no error/warning observed in kernel log.
Thanks
David
Powered by blists - more mailing lists