From: Matthew Wilcox <willy@infradead.org>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: linux-mm@kvack.org, John Hubbard <jhubbard@nvidia.com>,
Christoph Hellwig <hch@infradead.org>,
William Kucharski <william.kucharski@oracle.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 00/28] Convert GUP to folios
Date: Mon, 10 Jan 2022 16:09:31 +0000 [thread overview]
Message-ID: <YdxaO7nAj0oGXtm9@casper.infradead.org> (raw)
In-Reply-To: <20220110153103.GH6467@ziepe.ca>
On Mon, Jan 10, 2022 at 11:31:03AM -0400, Jason Gunthorpe wrote:
>
> On Mon, Jan 10, 2022 at 04:23:38AM +0000, Matthew Wilcox (Oracle) wrote:
> > This patch series is against my current folio for-next branch. I know
> > it won't apply to sfr's next tree, and it's not for-next material yet.
> > I intend to submit it for 5.18 after I've rebased it to one of the
> > 5.17-rc releases.
> >
> > The overall effect of this (ignoring the primary "preparing for folios
> > that are not PAGE or PMD sized" purpose) is to reduce the size of gup.o
> > by ~700 bytes in the config I normally test with.
> >
> > This patchset just converts existing implementations to use folios.
> > There's no new API for consumers here to provide information in a more
> > efficient (address, length) format. That will be a separate patchset.
> >
> > In v2, I've tried to address all the comments from the reviews I got
> > on v1. Apologies if I missed anything; I got a lot of good feedback.
> > Primarily I separated out the folio changes (later) from the "While
> > I'm looking at this ..." changes (earlier). I'm not sure the story
> > of the patchset is necessarily coherent this way, but it should be
> > easier to review.
> >
> > Another big change is that compound_pincount is now available to all
> > compound pages, not just those that are order-2-or-higher. Patch 11.
> >
> > I did notice one bug in my original patchset which I'm disappointed GCC
> > didn't diagnose:
> >
> > pages[nr++] = nth_page(page, nr);
> >
> > Given the massive reorg of the patchset, I didn't feel right using
> > anyone's SoB from v1 on any of the patches. But, despite the increased
> > number of patches, I hope it's easier to review than v1.
> >
> > And I'd dearly love a better name than 'folio_nth'. page_nth() is
> > a temporary construct, so doesn't need a better name. If you need
> > context, it's in the gup_folio_range_next() patch and its job
> > is to tell you, given a page and a folio, what # page it is within
> > a folio (so a number between [0 and folio_nr_pages())).
>
> folio_tail_index() ?
I'm a little wary of "index" because folios are used to cache file data,
and folio->index means offset of the folio within the file. We could
make the argument for folio_page_index() (since it might be the head
page, not a tail page), and argue this is the index into the folio,
not the index into the file.
It's better than folio_nth ;-)
> Series still looks good to me, though I checked each patch
> carefully than the prior series:
>
> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Thanks!
next prev parent reply other threads:[~2022-01-10 16:09 UTC|newest]
Thread overview: 96+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-10 4:23 [PATCH v2 00/28] Convert GUP to folios Matthew Wilcox (Oracle)
2022-01-10 4:23 ` [PATCH v2 01/28] gup: Remove for_each_compound_range() Matthew Wilcox (Oracle)
2022-01-10 8:22 ` Christoph Hellwig
2022-01-11 1:07 ` John Hubbard
2022-01-10 4:23 ` [PATCH v2 02/28] gup: Remove for_each_compound_head() Matthew Wilcox (Oracle)
2022-01-10 8:23 ` Christoph Hellwig
2022-01-11 1:11 ` John Hubbard
2022-01-10 4:23 ` [PATCH v2 03/28] gup: Change the calling convention for compound_range_next() Matthew Wilcox (Oracle)
2022-01-10 8:25 ` Christoph Hellwig
2022-01-11 1:14 ` John Hubbard
2022-01-10 4:23 ` [PATCH v2 04/28] gup: Optimise compound_range_next() Matthew Wilcox (Oracle)
2022-01-10 8:26 ` Christoph Hellwig
2022-01-11 1:16 ` John Hubbard
2022-01-10 4:23 ` [PATCH v2 05/28] gup: Change the calling convention for compound_next() Matthew Wilcox (Oracle)
2022-01-10 8:27 ` Christoph Hellwig
2022-01-10 13:28 ` Matthew Wilcox
2022-01-11 1:18 ` John Hubbard
2022-01-10 4:23 ` [PATCH v2 06/28] gup: Fix some contiguous memmap assumptions Matthew Wilcox (Oracle)
2022-01-10 8:29 ` Christoph Hellwig
2022-01-10 13:37 ` Matthew Wilcox
2022-01-10 19:05 ` [External] : " Mike Kravetz
2022-01-11 1:47 ` John Hubbard
2022-01-10 4:23 ` [PATCH v2 07/28] gup: Remove an assumption of a contiguous memmap Matthew Wilcox (Oracle)
2022-01-10 8:30 ` Christoph Hellwig
2022-01-11 3:27 ` John Hubbard
2022-01-10 4:23 ` [PATCH v2 08/28] gup: Handle page split race more efficiently Matthew Wilcox (Oracle)
2022-01-10 8:31 ` Christoph Hellwig
2022-01-11 3:30 ` John Hubbard
2022-01-10 4:23 ` [PATCH v2 09/28] gup: Turn hpage_pincount_add() into page_pincount_add() Matthew Wilcox (Oracle)
2022-01-10 8:31 ` Christoph Hellwig
2022-01-11 3:35 ` John Hubbard
2022-01-11 4:32 ` John Hubbard
2022-01-11 13:46 ` Matthew Wilcox
2022-01-10 4:23 ` [PATCH v2 10/28] gup: Turn hpage_pincount_sub() into page_pincount_sub() Matthew Wilcox (Oracle)
2022-01-10 8:32 ` Christoph Hellwig
2022-01-11 6:40 ` John Hubbard
2022-01-10 4:23 ` [PATCH v2 11/28] mm: Make compound_pincount always available Matthew Wilcox (Oracle)
2022-01-11 4:06 ` John Hubbard
2022-01-11 4:38 ` Matthew Wilcox
2022-01-11 5:10 ` John Hubbard
2022-01-20 9:15 ` Christoph Hellwig
2022-01-10 4:23 ` [PATCH v2 12/28] mm: Add folio_put_refs() Matthew Wilcox (Oracle)
2022-01-10 8:32 ` Christoph Hellwig
2022-01-11 4:14 ` John Hubbard
2022-01-10 4:23 ` [PATCH v2 13/28] mm: Add folio_pincount_ptr() Matthew Wilcox (Oracle)
2022-01-10 8:33 ` Christoph Hellwig
2022-01-11 4:22 ` John Hubbard
2022-01-10 4:23 ` [PATCH v2 14/28] mm: Convert page_maybe_dma_pinned() to use a folio Matthew Wilcox (Oracle)
2022-01-10 8:33 ` Christoph Hellwig
2022-01-11 4:27 ` John Hubbard
2022-01-10 4:23 ` [PATCH v2 15/28] gup: Add try_get_folio() and try_grab_folio() Matthew Wilcox (Oracle)
2022-01-10 8:34 ` Christoph Hellwig
2022-01-11 5:00 ` John Hubbard
2022-01-10 4:23 ` [PATCH v2 16/28] mm: Remove page_cache_add_speculative() and page_cache_get_speculative() Matthew Wilcox (Oracle)
2022-01-10 8:35 ` Christoph Hellwig
2022-01-11 5:14 ` John Hubbard
2022-01-10 4:23 ` [PATCH v2 17/28] gup: Add gup_put_folio() Matthew Wilcox (Oracle)
2022-01-10 8:35 ` Christoph Hellwig
2022-01-11 6:44 ` John Hubbard
2022-01-10 4:23 ` [PATCH v2 18/28] hugetlb: Use try_grab_folio() instead of try_grab_compound_head() Matthew Wilcox (Oracle)
2022-01-10 8:36 ` Christoph Hellwig
2022-01-11 6:47 ` John Hubbard
2022-01-10 4:23 ` [PATCH v2 19/28] gup: Convert try_grab_page() to call try_grab_folio() Matthew Wilcox (Oracle)
2022-01-10 8:36 ` Christoph Hellwig
2022-01-11 7:01 ` John Hubbard
2022-01-10 4:23 ` [PATCH v2 20/28] gup: Convert gup_pte_range() to use a folio Matthew Wilcox (Oracle)
2022-01-10 8:37 ` Christoph Hellwig
2022-01-11 7:06 ` John Hubbard
2022-01-10 4:23 ` [PATCH v2 21/28] gup: Convert gup_hugepte() " Matthew Wilcox (Oracle)
2022-01-10 8:37 ` Christoph Hellwig
2022-01-11 7:33 ` John Hubbard
2022-01-10 4:24 ` [PATCH v2 22/28] gup: Convert gup_huge_pmd() " Matthew Wilcox (Oracle)
2022-01-10 8:37 ` Christoph Hellwig
2022-01-11 7:36 ` John Hubbard
2022-01-10 4:24 ` [PATCH v2 23/28] gup: Convert gup_huge_pud() " Matthew Wilcox (Oracle)
2022-01-10 8:38 ` Christoph Hellwig
2022-01-11 7:38 ` John Hubbard
2022-01-10 4:24 ` [PATCH v2 24/28] gup: Convert gup_huge_pgd() " Matthew Wilcox (Oracle)
2022-01-10 8:38 ` Christoph Hellwig
2022-01-11 7:38 ` John Hubbard
2022-01-10 4:24 ` [PATCH v2 25/28] gup: Convert compound_next() to gup_folio_next() Matthew Wilcox (Oracle)
2022-01-10 8:39 ` Christoph Hellwig
2022-01-11 7:41 ` John Hubbard
2022-01-10 4:24 ` [PATCH v2 26/28] gup: Convert compound_range_next() to gup_folio_range_next() Matthew Wilcox (Oracle)
2022-01-10 8:41 ` Christoph Hellwig
2022-01-10 13:41 ` Matthew Wilcox
2022-01-11 7:44 ` John Hubbard
2022-01-10 4:24 ` [PATCH v2 27/28] mm: Add isolate_lru_folio() Matthew Wilcox (Oracle)
2022-01-10 8:42 ` Christoph Hellwig
2022-01-11 7:49 ` John Hubbard
2022-01-10 4:24 ` [PATCH v2 28/28] gup: Convert check_and_migrate_movable_pages() to use a folio Matthew Wilcox (Oracle)
2022-01-10 8:42 ` Christoph Hellwig
2022-01-11 7:52 ` John Hubbard
2022-01-10 15:31 ` [PATCH v2 00/28] Convert GUP to folios Jason Gunthorpe
2022-01-10 16:09 ` Matthew Wilcox [this message]
2022-01-10 17:26 ` William Kucharski
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=YdxaO7nAj0oGXtm9@casper.infradead.org \
--to=willy@infradead.org \
--cc=hch@infradead.org \
--cc=jgg@ziepe.ca \
--cc=jhubbard@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=william.kucharski@oracle.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).