From: Zi Yan <ziy@nvidia.com>
To: Andrew Morton <akpm@linux-foundation.org>,
"Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: 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, 07 Feb 2025 09:11:39 -0500 [thread overview]
Message-ID: <019EB6CA-0F4B-496A-B2AE-A3A553585281@nvidia.com> (raw)
In-Reply-To: <20250206000111.6c54e67d1933f8bbc01a46cd@linux-foundation.org>
On 6 Feb 2025, at 3:01, Andrew Morton wrote:
> On Tue, 4 Feb 2025 22:14:10 -0500 Zi Yan <ziy@nvidia.com> wrote:
>
>> This patchset adds a new buddy allocator like (or non-uniform) large folio
>> split to reduce the total number of after-split folios, the amount of memory
>> needed for multi-index xarray split, and keep more large folios after a split.
>
> It would be useful (vital, really) to provide some measurements which
> help others understand the magnitude of these resource savings, please.
Hi Andrew,
Can you please drop this series for now? I find that, after your above request,
I misunderstood how xas_split_alloc() and xas_split() works in xarray, thus,
my current implementation allocates more than enough xa_node during non-uniform
split, although the excessive ones are freed at the end. It defeats the purpose
of reducing memory consumption of multi-index xarray split, even if
folio_split() has no function issue AFAICT. I am working on a better
implementation that might require new xarray operations. I will post it as v7
later. I really appreciate that you asked about more info above. :)
More details on memory saving for multi-index xarray split during non-uniform
split compared to existing uniform split (I will add this to commit log in the
next version):
Existing uniform split requires 2^(order % XA_CHUNK_SHIFT) xa_node allocations
during split, when the folio needs to be split to order-0. But non-uniform split
only requires at most 1 xa_node allocation. For example, to split an order-9
folio, 8 xa_nodes are needed for uniform split, since the folio takes 8
multi-index slots in the xarray. But for non-uniform split, only the slot
containing the given struct page needs a xa_node after the split. There will be
a 7 xa_node saving.
Hi Matthew,
Do you mind checking my statement above on xarray memory saving? And correct me
if I miss anything. Thanks.
Best Regards,
Yan, Zi
next prev parent reply other threads:[~2025-02-07 14:11 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 [this message]
2025-02-07 14:25 ` Matthew Wilcox
2025-02-07 14:35 ` Zi Yan
2025-02-07 15:00 ` Matthew Wilcox
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=019EB6CA-0F4B-496A-B2AE-A3A553585281@nvidia.com \
--to=ziy@nvidia.com \
--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=willy@infradead.org \
--cc=yang@os.amperecomputing.com \
--cc=yuzhao@google.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
all inboxes | Powered by JetHome®