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, 29 Sep 2017 22:43:21 +0200
From:   Alexandru Moise <00moses.alexander00@...il.com>
To:     akpm@...ux-foundation.org
Cc:     mike.kravetz@...cle.com, mhocko@...e.com,
        n-horiguchi@...jp.nec.com, aneesh.kumar@...ux.vnet.ibm.com,
        punit.agrawal@....com, gerald.schaefer@...ibm.com,
        aarcange@...hat.com, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, kirill@...temov.name
Subject: Re: [PATCH] mm, hugetlb: fix "treat_as_movable" condition in
 htlb_alloc_mask

On Fri, Sep 29, 2017 at 05:13:39PM +0200, Alexandru Moise wrote:
> If hugepage_migration_supported() returns true, this renders the
> hugepages_treat_as_movable sysctl completely pointless.
> 
> Let's keep this behavior optional by switching the if() condition
> from || to &&.
> 
> Signed-off-by: Alexandru Moise <00moses.alexander00@...il.com>
> ---
>  mm/hugetlb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/hugetlb.c b/mm/hugetlb.c
> index 424b0ef08a60..ab28de0122af 100644
> --- a/mm/hugetlb.c
> +++ b/mm/hugetlb.c
> @@ -926,7 +926,7 @@ static struct page *dequeue_huge_page_nodemask(struct hstate *h, gfp_t gfp_mask,
>  /* Movability of hugepages depends on migration support. */
>  static inline gfp_t htlb_alloc_mask(struct hstate *h)
>  {
> -	if (hugepages_treat_as_movable || hugepage_migration_supported(h))
> +	if (hugepages_treat_as_movable && hugepage_migration_supported(h))
>  		return GFP_HIGHUSER_MOVABLE;
>  	else
>  		return GFP_HIGHUSER;
> -- 
> 2.14.2
> 

I seem to have terribly misunderstood the semantics of this flag wrt hugepages,
please ignore this for now.

../Alex

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ