[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <yu5u6srhyixvnx66qvin3rk5p3ve4yxu7v6qj4ymma3fnbk4fg@yneglqtwpvyc>
Date: Thu, 7 Nov 2024 16:01:51 +0200
From: "Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>
To: Zi Yan <ziy@...dia.com>
Cc: "Matthew Wilcox (Oracle)" <willy@...radead.org>, linux-mm@...ck.org,
Ryan Roberts <ryan.roberts@....com>, Hugh Dickins <hughd@...gle.com>,
David Hildenbrand <david@...hat.com>, Yang Shi <yang@...amperecomputing.com>,
Miaohe Lin <linmiaohe@...wei.com>, Kefeng Wang <wangkefeng.wang@...wei.com>,
Yu Zhao <yuzhao@...gle.com>, John Hubbard <jhubbard@...dia.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/6] mm/huge_memory: add two new (yet used) functions
for folio_split()
On Wed, Nov 06, 2024 at 05:06:32PM -0500, Zi Yan wrote:
> >> + } else {
> >> + if (PageHead(head))
> >> + ClearPageCompound(head);
> >
> > Huh? You only have to test for PageHead() because it is inside the loop.
> > It has to be done after loop is done.
>
> You are right, will remove this and add the code below after the loop.
>
> if (!new_order && PageHead(&folio->page))
> ClearPageCompound(&folio->page);
PageHead(&forlio->page) is always true, isn't it?
> >> + if (folio_test_anon(folio) && folio_test_swapcache(folio)) {
> >> + if (!uniform_split)
> >> + return -EINVAL;
> >
> > Why this limitation?
>
> I am not closely following the status of mTHP support in swap. If it
> is supported, this can be removed. Right now, split_huge_page_to_list_to_order()
> only allows to split a swapcache folio to order 0[1].
>
> [1] https://elixir.bootlin.com/linux/v6.12-rc6/source/mm/huge_memory.c#L3397
It would be nice to clarify this or at least add a comment.
--
Kiryl Shutsemau / Kirill A. Shutemov
Powered by blists - more mailing lists