From: Jason Gunthorpe <jgg@nvidia.com>
To: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Peter Xu <peterx@redhat.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [RFC PATCH 4/8] mm: Provide mm_struct and address to huge_ptep_get()
Date: Mon, 25 Mar 2024 13:35:59 -0300 [thread overview]
Message-ID: <20240325163559.GE6245@nvidia.com> (raw)
In-Reply-To: <1abe6cfaba2ad41a9deb705a4d3de8d1a9b6d5ca.1711377230.git.christophe.leroy@csgroup.eu>
On Mon, Mar 25, 2024 at 03:55:57PM +0100, Christophe Leroy wrote:
> arch/arm64/include/asm/hugetlb.h | 2 +-
> fs/hugetlbfs/inode.c | 2 +-
> fs/proc/task_mmu.c | 8 +++---
> fs/userfaultfd.c | 2 +-
> include/asm-generic/hugetlb.h | 2 +-
> include/linux/swapops.h | 2 +-
> mm/damon/vaddr.c | 6 ++---
> mm/gup.c | 2 +-
> mm/hmm.c | 2 +-
> mm/hugetlb.c | 46 ++++++++++++++++----------------
> mm/memory-failure.c | 2 +-
> mm/mempolicy.c | 2 +-
> mm/migrate.c | 4 +--
> mm/mincore.c | 2 +-
> mm/userfaultfd.c | 2 +-
> 15 files changed, 43 insertions(+), 43 deletions(-)
>
> diff --git a/arch/qarm64/include/asm/hugetlb.h b/arch/arm64/include/asm/hugetlb.h
> index 2ddc33d93b13..1af39a74e791 100644
> --- a/arch/arm64/include/asm/hugetlb.h
> +++ b/arch/arm64/include/asm/hugetlb.h
> @@ -46,7 +46,7 @@ extern pte_t huge_ptep_clear_flush(struct vm_area_struct *vma,
> extern void huge_pte_clear(struct mm_struct *mm, unsigned long addr,
> pte_t *ptep, unsigned long sz);
> #define __HAVE_ARCH_HUGE_PTEP_GET
> -extern pte_t huge_ptep_get(pte_t *ptep);
> +extern pte_t huge_ptep_get(struct mm_struct *mm, unsigned long addr, pte_t *ptep);
The header changed but not the implementation? This will need to do
riscv and s390 too.
Though, really, I think the right path is to work toward removing
huge_ptep_get() from the arch code..
riscv and arm are doing the same thing - propogating dirty/young bits
from the contig PTEs to the results. The core code can do this, maybe
with a ARCH #define opt in.
s390.. Ouchy - is this because hugetlb wants to pretend that every
level is encoded as a PTE so it takes the PGD and recodes the flags to
the PTE layout??
Jason
next prev parent reply other threads:[~2024-03-25 16:36 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-25 14:55 [RFC PATCH 0/8] Reimplement huge pages without hugepd on powerpc 8xx Christophe Leroy
2024-03-25 14:55 ` [RFC PATCH 1/8] mm: Provide pagesize to pmd_populate() Christophe Leroy
2024-03-25 16:19 ` Jason Gunthorpe
2024-03-25 19:05 ` Christophe Leroy
2024-03-26 15:01 ` Jason Gunthorpe
2024-03-27 9:58 ` Christophe Leroy
2024-03-27 16:57 ` Jason Gunthorpe
2024-04-03 18:24 ` Christophe Leroy
2024-04-04 11:46 ` Jason Gunthorpe
2024-05-26 9:29 ` Christophe Leroy
2024-03-25 14:55 ` [RFC PATCH 2/8] mm: Provide page size to pte_alloc_huge() Christophe Leroy
2024-03-25 14:55 ` [RFC PATCH 3/8] mm: Provide pmd to pte_leaf_size() Christophe Leroy
2024-03-25 14:55 ` [RFC PATCH 4/8] mm: Provide mm_struct and address to huge_ptep_get() Christophe Leroy
2024-03-25 16:35 ` Jason Gunthorpe [this message]
2024-05-26 9:25 ` Christophe Leroy
2024-03-25 14:55 ` [RFC PATCH 5/8] powerpc/mm: Allow hugepages without hugepd Christophe Leroy
2024-03-25 14:55 ` [RFC PATCH 6/8] powerpc/8xx: Fix size given to set_huge_pte_at() Christophe Leroy
2024-03-25 14:56 ` [RFC PATCH 7/8] powerpc/8xx: Remove support for 8M pages Christophe Leroy
2024-03-25 14:56 ` [RFC PATCH 8/8] powerpc/8xx: Add back support for 8M pages using contiguous PTE entries Christophe Leroy
2024-03-25 16:38 ` [RFC PATCH 0/8] Reimplement huge pages without hugepd on powerpc 8xx Jason Gunthorpe
2024-04-11 16:15 ` Peter Xu
2024-04-12 14:08 ` Christophe Leroy
2024-04-12 14:30 ` Peter Xu
2024-04-15 19:12 ` Christophe Leroy
2024-04-16 10:58 ` Christophe Leroy
2024-04-16 19:40 ` Peter Xu
2024-05-17 14:27 ` Oscar Salvador
2024-05-22 9:08 ` Christophe Leroy
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=20240325163559.GE6245@nvidia.com \
--to=jgg@nvidia.com \
--cc=akpm@linux-foundation.org \
--cc=christophe.leroy@csgroup.eu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=peterx@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).