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]
Date:   Fri, 28 Feb 2020 15:39:38 +0100
From:   Vlastimil Babka <vbabka@...e.cz>
To:     Rik van Riel <riel@...riel.com>,
        Mike Kravetz <mike.kravetz@...cle.com>,
        linux-kernel@...r.kernel.org
Cc:     kernel-team@...com, akpm@...ux-foundation.org, linux-mm@...ck.org,
        mhocko@...nel.org, mgorman@...hsingularity.net,
        rientjes@...gle.com, aarcange@...hat.com, ziy@...dia.com
Subject: Re: [PATCH v2 2/2] mm,thp,compaction,cma: allow THP migration for CMA
 allocations

On 2/28/20 3:32 PM, Rik van Riel wrote:

>>> Does that need to be the following, then?
>>>
>>>      if (PageTransHuge(head) && !PageHuge(page) && !PageLRU(head)
>>> &&
>>> !__PageMovable(head))
>>>                  return page;
>>
>> I would instead make it an "else if" to the "if (PageHuge(page)...)"
>> above.
> 
> That was my first thought too, but that could break on
> pages that are PageHuge when hugepage_migration_supported
> returns true.

Right, so then

if (PageHuge()) {
	if (!migration_supported) return false;
} else if (!PageLRU(head) ...) {
   etc...

IMHO it's better than adding more tests to the second if.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ