linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Zi Yan <ziy@nvidia.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org,
	"Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>,
	Ryan Roberts <ryan.roberts@arm.com>,
	Hugh Dickins <hughd@google.com>,
	David Hildenbrand <david@redhat.com>,
	Yang Shi <yang@os.amperecomputing.com>,
	Miaohe Lin <linmiaohe@huawei.com>,
	Kefeng Wang <wangkefeng.wang@huawei.com>,
	Yu Zhao <yuzhao@google.com>, John Hubbard <jhubbard@nvidia.com>,
	Baolin Wang <baolin.wang@linux.alibaba.com>,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6 0/7] Buddy allocator like (or non-uniform) folio split
Date: Fri, 7 Feb 2025 15:00:11 +0000	[thread overview]
Message-ID: <Z6Yf-1YLgUK-K-uS@casper.infradead.org> (raw)
In-Reply-To: <E4287DB5-7D0D-41D7-BC0E-F5F404853931@nvidia.com>

On Fri, Feb 07, 2025 at 09:35:27AM -0500, Zi Yan wrote:
> On 7 Feb 2025, at 9:25, Matthew Wilcox wrote:
> > As part of your series, I'd like to remove that limitation, so we'd need
> > to allocate log_64(n - m) [ok, more complex than that, but ykwim].  So
> > it's not quite "only allocate one node", but it's allocate O(log(current
> > number of nodes needed to be allocated)).
> >
> > Makes sense?
> 
> Yes.
> 
> To remove that order-12 limitation, do shmem_split_large_entry() and
> __filemap_add_folio() need some change as well? Both call xas_split_alloc().
> But I do not know if they will see splitting order-12 to order-(0 to 5).

__filemap_add_folio() doesn't need to fracture like it currently does;
it can do the same minimum split.  The situation is that we've got a
shadow entry which covers 2^n slots, and now we want to add a folio
which only covers 2^m slots with m < n.  Leaving n-m shadow entries in the tree
with orders ranging from m to n-1 makes more sense than the eager split.

shmem is the same, except that it's storing swap entries instead of
shadow entries.


      reply	other threads:[~2025-02-07 15:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-05  3:14 Zi Yan
2025-02-05  3:14 ` [PATCH v6 1/7] mm/huge_memory: add two new (not yet used) functions for folio_split() Zi Yan
2025-02-05  3:14 ` [PATCH v6 2/7] mm/huge_memory: move folio split common code to __folio_split() Zi Yan
2025-02-05  3:14 ` [PATCH v6 3/7] mm/huge_memory: add buddy allocator like folio_split() Zi Yan
2025-02-05  3:14 ` [PATCH v6 4/7] mm/huge_memory: remove the old, unused __split_huge_page() Zi Yan
2025-02-05  3:14 ` [PATCH v6 5/7] mm/huge_memory: add folio_split() to debugfs testing interface Zi Yan
2025-02-05  3:14 ` [PATCH v6 6/7] mm/truncate: use buddy allocator like folio split for truncate operation Zi Yan
2025-02-05  3:14 ` [PATCH v6 7/7] selftests/mm: add tests for folio_split(), buddy allocator like split Zi Yan
2025-02-06  8:01 ` [PATCH v6 0/7] Buddy allocator like (or non-uniform) folio split Andrew Morton
2025-02-07 14:11   ` Zi Yan
2025-02-07 14:25     ` Matthew Wilcox
2025-02-07 14:35       ` Zi Yan
2025-02-07 15:00         ` Matthew Wilcox [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=Z6Yf-1YLgUK-K-uS@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=david@redhat.com \
    --cc=hughd@google.com \
    --cc=jhubbard@nvidia.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linmiaohe@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ryan.roberts@arm.com \
    --cc=wangkefeng.wang@huawei.com \
    --cc=yang@os.amperecomputing.com \
    --cc=yuzhao@google.com \
    --cc=ziy@nvidia.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