linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Zi Yan <ziy@nvidia.com>
To: David Hildenbrand <david@redhat.com>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>,
	"Yang Shi" <shy828301@gmail.com>, "Yu Zhao" <yuzhao@google.com>,
	linux-mm@kvack.org,
	"Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>,
	"Ryan Roberts" <ryan.roberts@arm.com>,
	"Michal Koutný" <mkoutny@suse.com>,
	"Roman Gushchin" <roman.gushchin@linux.dev>,
	"Zach O'Keefe" <zokeefe@google.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, cgroups@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH v2 5/7] mm: thp: split huge page to any lower order pages.
Date: Tue, 08 Aug 2023 10:45:34 -0400	[thread overview]
Message-ID: <A6C02D09-CD3A-4F12-89D6-F1F4B03C177A@nvidia.com> (raw)
In-Reply-To: <b545cac8-76f7-e3c3-0e1c-3cb922c9c9ae@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1330 bytes --]

On 8 Aug 2023, at 5:01, David Hildenbrand wrote:

> On 29.03.23 03:17, Zi Yan wrote:
>> From: Zi Yan <ziy@nvidia.com>
>>
>> To split a THP to any lower order pages, we need to reform THPs on
>> subpages at given order and add page refcount based on the new page
>> order. Also we need to reinitialize page_deferred_list after removing
>> the page from the split_queue, otherwise a subsequent split will see
>> list corruption when checking the page_deferred_list again.
>>
>> It has many uses, like minimizing the number of pages after
>> truncating a huge pagecache page. For anonymous THPs, we can only split
>> them to order-0 like before until we add support for any size anonymous
>> THPs.
>>
>
> Because I'm currently looking into something that would also not be compatible with order-1 for now:
>
> You should make it clear that order-1 is not supported, like:
>
> "mm: thp: split huge page to any lower order pages (except order 1)"
>
> And clarify in the subject why that is the case.

Sure.

I will add below to the commit message and the comment of
split_huge_page_to_list_to_order():

Order-1 folio is not supported because _deferred_list, which is used by
partially mapped folios, is stored in subpage 2 and an order-1 folio only
has subpage 0 and 1.


--
Best Regards,
Yan, Zi

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 854 bytes --]

  reply	other threads:[~2023-08-08 14:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-29  1:17 [PATCH v2 0/7] Split a folio to any lower order folios Zi Yan
2023-03-29  1:17 ` [PATCH v2 1/7] mm/memcg: use order instead of nr in split_page_memcg() Zi Yan
2023-03-29  1:17 ` [PATCH v2 2/7] mm/page_owner: use order instead of nr in split_page_owner() Zi Yan
2023-03-29  1:17 ` [PATCH v2 3/7] mm: memcg: make memcg huge page split support any order split Zi Yan
2023-03-29  1:17 ` [PATCH v2 4/7] mm: page_owner: add support for splitting to any order in split page_owner Zi Yan
2023-03-29  9:58   ` kernel test robot
2023-03-29 13:16     ` Zi Yan
2023-03-29 14:48   ` kernel test robot
2023-03-29 16:11   ` kernel test robot
2023-03-29  1:17 ` [PATCH v2 5/7] mm: thp: split huge page to any lower order pages Zi Yan
2023-08-08  9:01   ` David Hildenbrand
2023-08-08 14:45     ` Zi Yan [this message]
2023-03-29  1:17 ` [PATCH v2 6/7] mm: truncate: split huge page cache page to a non-zero order if possible Zi Yan
2023-03-29  1:17 ` [PATCH v2 7/7] mm: huge_memory: enable debugfs to split huge pages to any order Zi Yan

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=A6C02D09-CD3A-4F12-89D6-F1F4B03C177A@nvidia.com \
    --to=ziy@nvidia.com \
    --cc=akpm@linux-foundation.org \
    --cc=cgroups@vger.kernel.org \
    --cc=david@redhat.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mkoutny@suse.com \
    --cc=roman.gushchin@linux.dev \
    --cc=ryan.roberts@arm.com \
    --cc=shy828301@gmail.com \
    --cc=willy@infradead.org \
    --cc=yuzhao@google.com \
    --cc=zokeefe@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