[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <372a9331-6d95-4083-9a8f-a4f714868bea@redhat.com>
Date: Thu, 28 Mar 2024 11:10:59 +0100
From: David Hildenbrand <david@...hat.com>
To: peterx@...hat.com, linux-mm@...ck.org, linux-kernel@...r.kernel.org
Cc: Yang Shi <shy828301@...il.com>, "Kirill A . Shutemov"
<kirill@...temov.name>, Mike Kravetz <mike.kravetz@...cle.com>,
John Hubbard <jhubbard@...dia.com>, Michael Ellerman <mpe@...erman.id.au>,
Andrew Jones <andrew.jones@...ux.dev>, Muchun Song <muchun.song@...ux.dev>,
linux-riscv@...ts.infradead.org, linuxppc-dev@...ts.ozlabs.org,
Christophe Leroy <christophe.leroy@...roup.eu>,
Andrew Morton <akpm@...ux-foundation.org>,
Christoph Hellwig <hch@...radead.org>, Lorenzo Stoakes <lstoakes@...il.com>,
Matthew Wilcox <willy@...radead.org>, Rik van Riel <riel@...riel.com>,
linux-arm-kernel@...ts.infradead.org, Andrea Arcangeli
<aarcange@...hat.com>, "Aneesh Kumar K . V" <aneesh.kumar@...nel.org>,
Vlastimil Babka <vbabka@...e.cz>, James Houghton <jthoughton@...gle.com>,
Jason Gunthorpe <jgg@...dia.com>, Mike Rapoport <rppt@...nel.org>,
Axel Rasmussen <axelrasmussen@...gle.com>
Subject: Re: [PATCH v4 06/13] mm/gup: Drop folio_fast_pin_allowed() in hugepd
processing
On 27.03.24 16:23, peterx@...hat.com wrote:
> From: Peter Xu <peterx@...hat.com>
>
> Hugepd format for GUP is only used in PowerPC with hugetlbfs. There are
> some kernel usage of hugepd (can refer to hugepd_populate_kernel() for
> PPC_8XX), however those pages are not candidates for GUP.
>
> Commit a6e79df92e4a ("mm/gup: disallow FOLL_LONGTERM GUP-fast writing to
> file-backed mappings") added a check to fail gup-fast if there's potential
> risk of violating GUP over writeback file systems. That should never apply
> to hugepd. Considering that hugepd is an old format (and even
> software-only), there's no plan to extend hugepd into other file typed
> memories that is prone to the same issue.
>
> Drop that check, not only because it'll never be true for hugepd per any
> known plan, but also it paves way for reusing the function outside
> fast-gup.
>
> To make sure we'll still remember this issue just in case hugepd will be
> extended to support non-hugetlbfs memories, add a rich comment above
> gup_huge_pd(), explaining the issue with proper references.
>
> Cc: Christoph Hellwig <hch@...radead.org>
> Cc: Lorenzo Stoakes <lstoakes@...il.com>
> Cc: Michael Ellerman <mpe@...erman.id.au>
> Cc: linuxppc-dev@...ts.ozlabs.org
> Signed-off-by: Peter Xu <peterx@...hat.com>
> ---
@Andrew, you properly adjusted the code to remove the
gup_fast_folio_allowed() call instead of the folio_fast_pin_allowed()
call, but
(1) the commit subject
(2) comment for gup_huge_pd()
Still mention folio_fast_pin_allowed().
The patch "mm/gup: handle hugepd for follow_page()" then moves that
(outdated) comment.
--
Cheers,
David / dhildenb
Powered by blists - more mailing lists