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] [day] [month] [year] [list]
Message-ID: <40b6c730-a5ff-4bf3-b284-179098bda0fb@redhat.com>
Date: Mon, 12 Aug 2024 11:06:49 +0200
From: David Hildenbrand <david@...hat.com>
To: "Huang, Ying" <ying.huang@...el.com>
Cc: Zi Yan <ziy@...dia.com>, linux-mm@...ck.org,
 Andrew Morton <akpm@...ux-foundation.org>,
 Baolin Wang <baolin.wang@...ux.alibaba.com>,
 Kefeng Wang <wangkefeng.wang@...wei.com>, Yang Shi <shy828301@...il.com>,
 Mel Gorman <mgorman@...e.de>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 3/3] mm/migrate: move common code to numa_migrate_check
 (was numa_migrate_prep)

On 12.08.24 04:20, Huang, Ying wrote:
> David Hildenbrand <david@...hat.com> writes:
> 
>> On 09.08.24 16:59, Zi Yan wrote:
>>> do_numa_page() and do_huge_pmd_numa_page() share a lot of common code. To
>>> reduce redundancy, move common code to numa_migrate_prep() and rename
>>> the function to numa_migrate_check() to reflect its functionality.
>>> Now do_huge_pmd_numa_page() also checks shared folios to set
>>> TNF_SHARED flag.
>>
>> Yeah, I was also wondering why we didn't check that in the PMD case.
> 
> IIUC, before commit 728be28fae8c ("mm: migrate: remove THP mapcount
> check in numamigrate_isolate_page()"), we don't allow to migrate THP
> with mapcount > 1.  So, it's unnecessary to set TNF_SHARED flag at that
> time.  However, after that commit, we need to do it.

Thanks for the pointer, rings a bell. Indeed, the check was remove for a 
different purpose, so introducing a check for setting the flag makes sense.

-- 
Cheers,

David / dhildenb


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ