From: Matthew Wilcox <willy@infradead.org>
To: "Kirill A. Shutemov" <kirill@shutemov.name>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 04/12] mm/vmscan: Free non-shmem folios without splitting them
Date: Mon, 17 Jan 2022 16:10:46 +0000 [thread overview]
Message-ID: <YeWVBkgYMp4MctTW@casper.infradead.org> (raw)
In-Reply-To: <20220117160625.oofpzl7tqm5udwaj@box.shutemov.name>
On Mon, Jan 17, 2022 at 07:06:25PM +0300, Kirill A. Shutemov wrote:
> On Sun, Jan 16, 2022 at 12:18:14PM +0000, Matthew Wilcox (Oracle) wrote:
> > We have to allocate memory in order to split a file-backed folio, so
> > it's not a good idea to split them in the memory freeing path.
>
> Could elaborate on why split a file-backed folio requires memory
> allocation?
In the commit message or explain it to you now?
We need to allocate xarray nodes to store all the newly-independent
pages. With a folio that's more than 64 entries in size (current
implementation), we elide the lowest layer of the radix tree. But
with any data structure that tracks folios, we'll need to create
space in it to track N folios instead of 1.
> > It also
> > doesn't work for XFS because pages have an extra reference count from
> > page_has_private() and split_huge_page() expects that reference to have
> > already been removed.
>
> Need to adjust can_split_huge_page()?
no?
> > Unfortunately, we still have to split shmem THPs
> > because we can't handle swapping out an entire THP yet.
>
> ... especially if the system doesn't have swap :P
Not sure what correction to the commit message you want here.
next prev parent reply other threads:[~2022-01-17 16:10 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-16 12:18 [PATCH 00/12] Enabling large folios for 5.17 Matthew Wilcox (Oracle)
2022-01-16 12:18 ` [PATCH 01/12] mm: Add folio_put_refs() Matthew Wilcox (Oracle)
2022-01-16 12:18 ` [PATCH 02/12] filemap: Use folio_put_refs() in filemap_free_folio() Matthew Wilcox (Oracle)
2022-01-17 15:56 ` Kirill A. Shutemov
2022-01-17 16:11 ` Matthew Wilcox
2022-01-16 12:18 ` [PATCH 03/12] filemap: Allow large folios to be added to the page cache Matthew Wilcox (Oracle)
2022-01-16 12:18 ` [PATCH 04/12] mm/vmscan: Free non-shmem folios without splitting them Matthew Wilcox (Oracle)
2022-01-17 16:06 ` Kirill A. Shutemov
2022-01-17 16:10 ` Matthew Wilcox [this message]
2022-01-17 21:00 ` Kirill A. Shutemov
2022-01-16 12:18 ` [PATCH 05/12] mm: Fix READ_ONLY_THP warning Matthew Wilcox (Oracle)
2022-01-16 12:18 ` [PATCH 06/12] mm/vmscan: Optimise shrink_page_list for non-PMD-sized folios Matthew Wilcox (Oracle)
2022-01-16 12:18 ` [PATCH 07/12] mm: Make large folios depend on THP Matthew Wilcox (Oracle)
2022-01-16 12:18 ` [PATCH 08/12] mm/readahead: Add large folio readahead Matthew Wilcox (Oracle)
2022-01-16 12:18 ` [PATCH 09/12] mm/readahead: Align file mappings for non-DAX Matthew Wilcox (Oracle)
2022-01-17 3:17 ` Rongwei Wang
2022-01-17 4:40 ` Matthew Wilcox
2022-01-16 12:18 ` [PATCH 10/12] mm/readahead: Switch to page_cache_ra_order Matthew Wilcox (Oracle)
2022-01-16 12:18 ` [PATCH 11/12] mm/filemap: Support VM_HUGEPAGE for file mappings Matthew Wilcox (Oracle)
2022-01-16 12:18 ` [PATCH 12/12] selftests/vm/transhuge-stress: Support file-backed PMD folios Matthew Wilcox (Oracle)
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=YeWVBkgYMp4MctTW@casper.infradead.org \
--to=willy@infradead.org \
--cc=kirill@shutemov.name \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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).