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: <1d700a57-24dd-7448-1d25-11c3e355f5fe@windriver.com>
Date:   Tue, 2 Feb 2021 20:19:48 +0800
From:   "Xu, Yanfei" <yanfei.xu@...driver.com>
To:     mike.kravetz@...cle.com, akpm@...ux-foundation.org,
        David Hildenbrand <david@...hat.com>
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] mm/hugetlb: remove redundant check in preparing and
 destroying gigantic page

I'm sorry for forgetting to add David.
Now add David :)

Thanks,
Yanfei

On 2/2/21 7:20 PM, yanfei.xu@...driver.com wrote:
> From: Yanfei Xu <yanfei.xu@...driver.com>
> 
> Gigantic page is a compound page and its order is more than 1.
> Thus it must be available for hpage_pincount. Let's remove the
> redundant check for gigantic page.
> 
> Signed-off-by: Yanfei Xu <yanfei.xu@...driver.com>
> ---
>   mm/hugetlb.c | 7 ++-----
>   1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/mm/hugetlb.c b/mm/hugetlb.c
> index a3e4fa2c5e94..dac5db569ccb 100644
> --- a/mm/hugetlb.c
> +++ b/mm/hugetlb.c
> @@ -1219,8 +1219,7 @@ static void destroy_compound_gigantic_page(struct page *page,
>   	struct page *p = page + 1;
>   
>   	atomic_set(compound_mapcount_ptr(page), 0);
> -	if (hpage_pincount_available(page))
> -		atomic_set(compound_pincount_ptr(page), 0);
> +	atomic_set(compound_pincount_ptr(page), 0);
>   
>   	for (i = 1; i < nr_pages; i++, p = mem_map_next(p, page, i)) {
>   		clear_compound_head(p);
> @@ -1501,9 +1500,7 @@ static void prep_compound_gigantic_page(struct page *page, unsigned int order)
>   		set_compound_head(p, page);
>   	}
>   	atomic_set(compound_mapcount_ptr(page), -1);
> -
> -	if (hpage_pincount_available(page))
> -		atomic_set(compound_pincount_ptr(page), 0);
> +	atomic_set(compound_pincount_ptr(page), 0);
>   }
>   
>   /*
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ