[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230614232459.GA38211@monkey>
Date: Wed, 14 Jun 2023 16:24:59 -0700
From: Mike Kravetz <mike.kravetz@...cle.com>
To: Peter Xu <peterx@...hat.com>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
Matthew Wilcox <willy@...radead.org>,
Andrea Arcangeli <aarcange@...hat.com>,
John Hubbard <jhubbard@...dia.com>,
Mike Rapoport <rppt@...nel.org>,
David Hildenbrand <david@...hat.com>,
Vlastimil Babka <vbabka@...e.cz>,
"Kirill A . Shutemov" <kirill@...temov.name>,
Andrew Morton <akpm@...ux-foundation.org>,
James Houghton <jthoughton@...gle.com>,
Hugh Dickins <hughd@...gle.com>
Subject: Re: [PATCH 1/7] mm/hugetlb: Handle FOLL_DUMP well in
follow_page_mask()
On 06/13/23 17:53, Peter Xu wrote:
> Firstly, the no_page_table() is meaningless for hugetlb which is a no-op
> there, because a hugetlb page always satisfies:
>
> - vma_is_anonymous() == false
> - vma->vm_ops->fault != NULL
>
> So we can already safely remove it in hugetlb_follow_page_mask(), alongside
> with the page* variable.
>
> Meanwhile, what we do in follow_hugetlb_page() actually makes sense for a
> dump: we try to fault in the page only if the page cache is already
> allocated. Let's do the same here for follow_page_mask() on hugetlb.
>
> It should so far has zero effect on real dumps, because that still goes
> into follow_hugetlb_page(). But this may start to influence a bit on
> follow_page() users who mimics a "dump page" scenario, but hopefully in a
> good way. This also paves way for unifying the hugetlb gup-slow.
>
> Signed-off-by: Peter Xu <peterx@...hat.com>
> ---
> mm/gup.c | 9 ++-------
> mm/hugetlb.c | 9 +++++++++
> 2 files changed, 11 insertions(+), 7 deletions(-)
Thanks Peter!
Reviewed-by: Mike Kravetz <mike.kravetz@...cle.com>
--
Mike Kravetz
Powered by blists - more mailing lists