lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <49DF696C-DD2A-4545-B6C5-BC84F4331560@nvidia.com>
Date: Thu, 07 Nov 2024 09:42:05 -0500
From: Zi Yan <ziy@...dia.com>
To: "Kirill A . Shutemov" <kirill.shutemov@...ux.intel.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 7 Nov 2024, at 9:01, Kirill A . Shutemov wrote:

> 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?

Yes. Will remove that if part. Thank you for pointing this out.

>
>>>> +	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.

Sure. Will add a comment about it.

--
Best Regards,
Yan, Zi

Download attachment "signature.asc" of type "application/pgp-signature" (855 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ