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: <0ccd43e9-fde3-4e13-8140-7d344b420e23@redhat.com>
Date: Fri, 5 Apr 2024 09:25:21 +0200
From: David Hildenbrand <david@...hat.com>
To: alexs@...nel.org, Matthew Wilcox <willy@...radead.org>,
 Andrea Arcangeli <aarcange@...hat.com>,
 Izik Eidus <izik.eidus@...ellosystems.com>,
 Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
 linux-kernel@...r.kernel.org, ryncsn@...il.com
Cc: Hugh Dickins <hughd@...gle.com>, Chris Wright <chrisw@...s-sol.org>
Subject: Re: [PATCH v3 03/14] mm/ksm: add folio_set_stable_node

On 25.03.24 13:48, alexs@...nel.org wrote:
> From: "Alex Shi (tencent)" <alexs@...nel.org>
> 
> Turn set_page_stable_node() into a wrapper folio_set_stable_node, and then
> use it to replace the former. we will merge them together after all
> place converted to folio.
> 
> Signed-off-by: Alex Shi (tencent) <alexs@...nel.org>
> Cc: Izik Eidus <izik.eidus@...ellosystems.com>
> Cc: Matthew Wilcox <willy@...radead.org>
> Cc: Andrea Arcangeli <aarcange@...hat.com>
> Cc: Hugh Dickins <hughd@...gle.com>
> Cc: Chris Wright <chrisw@...s-sol.org>
> ---
>   mm/ksm.c | 8 +++++++-
>   1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/mm/ksm.c b/mm/ksm.c
> index ea3dabf71e47..c9b7c5701f22 100644
> --- a/mm/ksm.c
> +++ b/mm/ksm.c
> @@ -1109,6 +1109,12 @@ static inline void set_page_stable_node(struct page *page,
>   	page->mapping = (void *)((unsigned long)stable_node | PAGE_MAPPING_KSM);
>   }
>   
> +static inline void folio_set_stable_node(struct folio *folio,
> +					 struct ksm_stable_node *stable_node)
> +{
> +	set_page_stable_node(&folio->page, stable_node);
> +}
> +
>   #ifdef CONFIG_SYSFS
>   /*
>    * Only called through the sysfs control interface:
> @@ -3241,7 +3247,7 @@ void folio_migrate_ksm(struct folio *newfolio, struct folio *folio)
>   		 * has gone stale (or that folio_test_swapcache has been cleared).
>   		 */
>   		smp_wmb();
> -		set_page_stable_node(&folio->page, NULL);
> +		folio_set_stable_node(folio, NULL);
>   	}
>   }
>   #endif /* CONFIG_MIGRATION */
Reviewed-by: David Hildenbrand <david@...hat.com>

-- 
Cheers,

David / dhildenb


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ