From: David Hildenbrand <david@redhat.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: Viacheslav Dubeyko <slava@dubeyko.com>,
Linux FS Devel <linux-fsdevel@vger.kernel.org>,
linux-mm@kvack.org, Hugh Dickins <hughd@google.com>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Subject: Re: Issue with 8K folio size in __filemap_get_folio()
Date: Mon, 4 Dec 2023 18:22:17 +0100 [thread overview]
Message-ID: <d830e87d-9937-43c8-b29b-826c31e31e9f@redhat.com> (raw)
In-Reply-To: <ZW4JqpKAc56aIUhF@casper.infradead.org>
On 04.12.23 18:17, Matthew Wilcox wrote:
> On Mon, Dec 04, 2023 at 04:09:36PM +0100, David Hildenbrand wrote:
>> I think for the pagecache it should work. In the context of [1], a total
>> mapcount would likely still be possible. Anything beyond that likely not, if
>> we ever care.
>
> I confess I hadn't gone through your patches.
>
> https://lore.kernel.org/all/20231124132626.235350-8-david@redhat.com/
>
> is the critical one. It's actually going to walk off the end of order-2
> folios today (which we'll create, eg with XFS).
Note that order-2 only uses _rmap_val0. So that *should* work as
expected (and that layout resulted in the best cache behavior, weirdly
enough).
>
> You can put _rmap_val0 and _rmap_val1 in page2 and _rmap_val2-5 in page3
> to fix this. Once we're allocating order-1 folios, I think you can
> avoid this scheme and just check page0 and page1 mapcounts independently.
I could put _rmap_val0 in page1 after I get rid of _folio_nr_pages.
That would make it work on 64bit.
But yeah, it feels kind of stupid to do elaborate tracking for "it's 2
pages". OTOH, less special-casing can be preferable.
--
Cheers,
David / dhildenb
prev parent reply other threads:[~2023-12-04 17:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <B467D07C-00D2-47C6-A034-2D88FE88A092@dubeyko.com>
2023-12-03 21:27 ` Issue with 8K folio size in __filemap_get_folio() Matthew Wilcox
2023-12-03 23:12 ` Matthew Wilcox
2023-12-04 5:57 ` Hugh Dickins
2023-12-04 15:09 ` David Hildenbrand
2023-12-04 16:51 ` David Hildenbrand
2023-12-04 17:17 ` Matthew Wilcox
2023-12-04 17:22 ` David Hildenbrand [this message]
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=d830e87d-9937-43c8-b29b-826c31e31e9f@redhat.com \
--to=david@redhat.com \
--cc=hughd@google.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=slava@dubeyko.com \
--cc=willy@infradead.org \
/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).