[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210201221654.GJ260413@xz-x1>
Date: Mon, 1 Feb 2021 17:16:54 -0500
From: Peter Xu <peterx@...hat.com>
To: Mike Kravetz <mike.kravetz@...cle.com>
Cc: Axel Rasmussen <axelrasmussen@...gle.com>,
Alexander Viro <viro@...iv.linux.org.uk>,
Alexey Dobriyan <adobriyan@...il.com>,
Andrea Arcangeli <aarcange@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Anshuman Khandual <anshuman.khandual@....com>,
Catalin Marinas <catalin.marinas@....com>,
Chinwen Chang <chinwen.chang@...iatek.com>,
Huang Ying <ying.huang@...el.com>,
Ingo Molnar <mingo@...hat.com>, Jann Horn <jannh@...gle.com>,
Jerome Glisse <jglisse@...hat.com>,
Lokesh Gidra <lokeshgidra@...gle.com>,
"Matthew Wilcox (Oracle)" <willy@...radead.org>,
Michael Ellerman <mpe@...erman.id.au>,
Michal Koutný <mkoutny@...e.com>,
Michel Lespinasse <walken@...gle.com>,
Mike Rapoport <rppt@...ux.vnet.ibm.com>,
Nicholas Piggin <npiggin@...il.com>, Shaohua Li <shli@...com>,
Shawn Anastasio <shawn@...stas.io>,
Steven Rostedt <rostedt@...dmis.org>,
Steven Price <steven.price@....com>,
Vlastimil Babka <vbabka@...e.cz>, linux-kernel@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
Adam Ruprecht <ruprecht@...gle.com>,
Cannon Matthews <cannonmatthews@...gle.com>,
"Dr . David Alan Gilbert" <dgilbert@...hat.com>,
David Rientjes <rientjes@...gle.com>,
Oliver Upton <oupton@...gle.com>
Subject: Re: [PATCH v4 1/9] hugetlb: Pass vma into huge_pte_alloc()
On Mon, Feb 01, 2021 at 01:53:14PM -0800, Mike Kravetz wrote:
> On 2/1/21 1:38 PM, Mike Kravetz wrote:
> > On 1/28/21 3:42 PM, Axel Rasmussen wrote:
> >> From: Peter Xu <peterx@...hat.com>
> >>
> >> It is a preparation work to be able to behave differently in the per
> >> architecture huge_pte_alloc() according to different VMA attributes.
> >>
> >> Signed-off-by: Peter Xu <peterx@...hat.com>
> >> [axelrasmussen@...gle.com: fixed typo in arch/mips/mm/hugetlbpage.c]
> >> Signed-off-by: Axel Rasmussen <axelrasmussen@...gle.com>
> >> ---
> >> arch/arm64/mm/hugetlbpage.c | 2 +-
> >> arch/ia64/mm/hugetlbpage.c | 3 ++-
> >> arch/mips/mm/hugetlbpage.c | 4 ++--
> >> arch/parisc/mm/hugetlbpage.c | 2 +-
> >> arch/powerpc/mm/hugetlbpage.c | 3 ++-
> >> arch/s390/mm/hugetlbpage.c | 2 +-
> >> arch/sh/mm/hugetlbpage.c | 2 +-
> >> arch/sparc/mm/hugetlbpage.c | 2 +-
> >> include/linux/hugetlb.h | 2 +-
> >> mm/hugetlb.c | 6 +++---
> >> mm/userfaultfd.c | 2 +-
> >> 11 files changed, 16 insertions(+), 14 deletions(-)
> >
> > Sorry for the delay in reviewing.
> >
> > huge_pmd_share() will do a find_vma() to get the vma. So, it would be
> > 'possible' to not add an extra argument to huge_pmd_alloc() and simply
> > do the uffd_disable_huge_pmd_share() check inside vma_shareable. This
> > would reduce the amount of modified code, but would not be as efficient.
> > I prefer passing the vma argument as is done here.
> >
> > Reviewed-by: Mike Kravetz <mike.kravetz@...cle.com>
>
>
> Another thought.
>
> We should pass the vma to huge_pmd_share to avoid the find_vma.
Agreed. Seems not relevant to this series, but should be a very nice add-on
after this patch can land. Thanks,
--
Peter Xu
Powered by blists - more mailing lists