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: <YrQVOcF4PirjGa/M@FVFYT0MHHV2J.usts.net>
Date:   Thu, 23 Jun 2022 15:24:41 +0800
From:   Muchun Song <songmuchun@...edance.com>
To:     Miaohe Lin <linmiaohe@...wei.com>
Cc:     akpm@...ux-foundation.org, shy828301@...il.com,
        willy@...radead.org, zokeefe@...gle.com, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 14/16] mm/huge_memory: fix comment of page_deferred_list

On Thu, Jun 23, 2022 at 01:06:25AM +0800, Miaohe Lin wrote:
> The current comment is confusing because if global or memcg deferred list
> in the second tail page is occupied by compound_head, why we still use
> page[2].deferred_list here? I think it wants to say that Global or memcg
> deferred list in the first tail page is occupied by compound_mapcount and
> compound_pincount so we use the second tail page's deferred_list instead.
> 
> Signed-off-by: Miaohe Lin <linmiaohe@...wei.com>
> ---
>  include/linux/huge_mm.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h
> index 12b297f9951d..2e8062b3417a 100644
> --- a/include/linux/huge_mm.h
> +++ b/include/linux/huge_mm.h
> @@ -294,8 +294,8 @@ static inline bool thp_migration_supported(void)
>  static inline struct list_head *page_deferred_list(struct page *page)
>  {
>  	/*
> -	 * Global or memcg deferred list in the second tail pages is
> -	 * occupied by compound_head.
> +	 * Global or memcg deferred list in the first tail page is
> +	 * occupied by compound_mapcount and compound_pincount.
>  	 */

The structure of "struct page" seems to have told us the information that
we resue the 2nd tail page to be used as deferred_list. I am not sure the
value of those comments. Maybe better to remove them?

Thanks.

>  	return &page[2].deferred_list;
>  }
> -- 
> 2.23.0
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ