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: <20200807142837.GB14692@L-31X9LVDL-1304.local>
Date:   Fri, 7 Aug 2020 22:28:37 +0800
From:   Wei Yang <richard.weiyang@...ux.alibaba.com>
To:     Baoquan He <bhe@...hat.com>
Cc:     Wei Yang <richard.weiyang@...ux.alibaba.com>,
        mike.kravetz@...cle.com, akpm@...ux-foundation.org,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 05/10] mm/hugetlb: remove the redundant check on
 non_swap_entry()

On Fri, Aug 07, 2020 at 08:55:50PM +0800, Baoquan He wrote:
>On 08/07/20 at 05:12pm, Wei Yang wrote:
>> Migration and hwpoison entry is a subset of non_swap_entry().
>> 
>> Remove the redundant check on non_swap_entry().
>> 
>> Signed-off-by: Wei Yang <richard.weiyang@...ux.alibaba.com>
>
>Hmm, I have posted one patch to do the same thing, got reivewed by
>people.
>
>https://lore.kernel.org/linux-mm/20200723104636.GS32539@MiWiFi-R3L-srv/
>

Nice

>> ---
>>  mm/hugetlb.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>> 
>> diff --git a/mm/hugetlb.c b/mm/hugetlb.c
>> index d775e514eb2e..f5f04e89000d 100644
>> --- a/mm/hugetlb.c
>> +++ b/mm/hugetlb.c
>> @@ -3778,7 +3778,7 @@ bool is_hugetlb_entry_migration(pte_t pte)
>>  	if (huge_pte_none(pte) || pte_present(pte))
>>  		return false;
>>  	swp = pte_to_swp_entry(pte);
>> -	if (non_swap_entry(swp) && is_migration_entry(swp))
>> +	if (is_migration_entry(swp))
>>  		return true;
>>  	else
>>  		return false;
>> @@ -3791,7 +3791,7 @@ static int is_hugetlb_entry_hwpoisoned(pte_t pte)
>>  	if (huge_pte_none(pte) || pte_present(pte))
>>  		return 0;
>>  	swp = pte_to_swp_entry(pte);
>> -	if (non_swap_entry(swp) && is_hwpoison_entry(swp))
>> +	if (is_hwpoison_entry(swp))
>>  		return 1;
>>  	else
>>  		return 0;
>> -- 
>> 2.20.1 (Apple Git-117)
>> 
>> 

-- 
Wei Yang
Help you, Help me

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ