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:   Mon, 17 Jul 2023 14:48:24 +0100
From:   Matthew Wilcox <willy@...radead.org>
To:     Peng Zhang <zhangpeng362@...wei.com>
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        sidhartha.kumar@...cle.com, akpm@...ux-foundation.org,
        wangkefeng.wang@...wei.com, sunnanyong@...wei.com
Subject: Re: [PATCH 5/6] mm/page_io: convert count_swpout_vm_event() to take
 in a folio

On Mon, Jul 17, 2023 at 09:26:01PM +0800, Peng Zhang wrote:
> -static inline void count_swpout_vm_event(struct page *page)
> +static inline void count_swpout_vm_event(struct folio *folio)
>  {
>  #ifdef CONFIG_TRANSPARENT_HUGEPAGE
> -	if (unlikely(PageTransHuge(page)))
> +	if (unlikely(folio_test_large(folio)))
>  		count_vm_event(THP_SWPOUT);
>  #endif

Since this is a THP_SWPOUT event, we should do this as:

-#ifdef CONFIG_TRANSPARENT_HUGEPAGE
-	if (unlikely(PageTransHuge(page)))
+	if (folio_test_pmd_mappable(folio))
		count_vm_event(THP_SWPOUT);
-#endif

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ