Re: [PATCH 1/3] mm: change huge_ptep_clear_flush() to return the original pte
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx>, akpm@xxxxxxxxxxxxxxxxxxxx, catalin.marinas@xxxxxxx, will@xxxxxxxxxx
- Subject: Re: [PATCH 1/3] mm: change huge_ptep_clear_flush() to return the original pte
- From: Mike Kravetz <mike.kravetz@xxxxxxxxxx>
- Date: Thu, 5 May 2022 16:15:26 -0700
- Cc: tsbogend@xxxxxxxxxxxxxxxx, James.Bottomley@xxxxxxxxxxxxxxxxxxxxx, deller@xxxxxx, mpe@xxxxxxxxxxxxxx, benh@xxxxxxxxxxxxxxxxxxx, paulus@xxxxxxxxx, hca@xxxxxxxxxxxxx, gor@xxxxxxxxxxxxx, agordeev@xxxxxxxxxxxxx, borntraeger@xxxxxxxxxxxxx, svens@xxxxxxxxxxxxx, ysato@xxxxxxxxxxxxx, dalias@xxxxxxxx, davem@xxxxxxxxxxxxx, arnd@xxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linux-mips@xxxxxxxxxxxxxxx, linux-parisc@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, sparclinux@xxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx
- In-reply-to: <a9038435d408cd7b9defe143537de668dfdf03be.1651216964.git.baolin.wang@linux.alibaba.com>
- References: <cover.1651216964.git.baolin.wang@linux.alibaba.com> <a9038435d408cd7b9defe143537de668dfdf03be.1651216964.git.baolin.wang@linux.alibaba.com>
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0
On 4/29/22 01:14, Baolin Wang wrote:
> It is incorrect to use ptep_clear_flush() to nuke a hugetlb page
> table when unmapping or migrating a hugetlb page, and will change
> to use huge_ptep_clear_flush() instead in the following patches.
>
> So this is a preparation patch, which changes the huge_ptep_clear_flush()
> to return the original pte to help to nuke a hugetlb page table.
>
> Signed-off-by: Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx>
> ---
> arch/arm64/include/asm/hugetlb.h | 4 ++--
> arch/arm64/mm/hugetlbpage.c | 12 +++++-------
> arch/ia64/include/asm/hugetlb.h | 4 ++--
> arch/mips/include/asm/hugetlb.h | 9 ++++++---
> arch/parisc/include/asm/hugetlb.h | 4 ++--
> arch/powerpc/include/asm/hugetlb.h | 9 ++++++---
> arch/s390/include/asm/hugetlb.h | 6 +++---
> arch/sh/include/asm/hugetlb.h | 4 ++--
> arch/sparc/include/asm/hugetlb.h | 4 ++--
> include/asm-generic/hugetlb.h | 4 ++--
> 10 files changed, 32 insertions(+), 28 deletions(-)
The above changes look straight forward.
Happy that you Cc'ed impacted arch maintainers so they can at least
have a look.
The only user of huge_ptep_clear_flush() today is hugetlb_cow/wp() in
mm/hugetlb.c. Any reason why you did not change that code? At least
cast the return of huge_ptep_clear_flush() to void with a comment?
Not absolutely necessary.
Acked-by: Mike Kravetz <mike.kravetz@xxxxxxxxxx>
--
Mike Kravetz
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]