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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <D0013D2F-F33A-4998-AB42-448C0F284639@nvidia.com>
Date: Fri, 25 Apr 2025 07:39:05 -0400
From: Zi Yan <ziy@...dia.com>
To: David Hildenbrand <david@...hat.com>
Cc: Gavin Guo <gavinguo@...lia.com>, linux-mm@...ck.org,
 akpm@...ux-foundation.org, gshan@...hat.com, willy@...radead.org,
 linmiaohe@...wei.com, hughd@...gle.com, revest@...gle.com,
 kernel-dev@...lia.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/2] mm/huge_memory: Adjust try_to_migrate_one() and
 split_huge_pmd_locked()

On 25 Apr 2025, at 7:23, David Hildenbrand wrote:

> On 25.04.25 13:10, Zi Yan wrote:
>> On 25 Apr 2025, at 6:38, Gavin Guo wrote:
>>
>>> The split_huge_pmd_locked function currently performs redundant checks
>>> for migration entries and folio validation that are already handled by
>>> the page_vma_mapped_walk mechanism in try_to_migrate_one.
>>>
>>> Specifically, page_vma_mapped_walk already ensures that:
>>> - The folio is properly mapped in the given VMA area
>>> - pmd_trans_huge, pmd_devmap, and migration entry validation are
>>> performed
>>>
>>> To leverage page_vma_mapped_walk's work, moving TTU_SPLIT_HUGE_PMD
>>> handling to the while loop checking and removing these duplicate checks
>>> from split_huge_pmd_locked.
>>>
>>> Suggested-by: David Hildenbrand <david@...hat.com>
>>> Link: https://lore.kernel.org/all/98d1d195-7821-4627-b518-83103ade56c0@redhat.com/
>>> Link: https://lore.kernel.org/all/91599a3c-e69e-4d79-bac5-5013c96203d7@redhat.com/
>>> Signed-off-by: Gavin Guo <gavinguo@...lia.com>
>>> Acked-by: David Hildenbrand <david@...hat.com>
>>> ---
>
>>
>> I wonder if we need a WARN here to make sure when THP migration support is not
>> present all PMDs are split in try_to_migrate_one().
>
> Can you elaborate on the condition you have in mind?
>
> If we have TTU_SPLIT_HUGE_PMD set, we'll never reach that point.
>
> Without CONFIG_ARCH_ENABLE_THP_MIGRATION, we should be running into the
> 	VM_BUG_ON_FOLIO(!pvmw.pte, folio);
>
> right?

Right. Missed that code, which is right at the bottom. Sorry about that.
Thank you for pointing this out.

OK, please disregard my comments. The patch is good in current form.


--
Best Regards,
Yan, Zi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ