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, 1 Jul 2024 09:48:37 +0100
From: Ryan Roberts <ryan.roberts@....com>
To: Barry Song <21cnbao@...il.com>, akpm@...ux-foundation.org,
 linux-mm@...ck.org
Cc: linux-kernel@...r.kernel.org, Barry Song <v-songbaohua@...o.com>,
 David Hildenbrand <david@...hat.com>
Subject: Re: [PATCH] mm/vmscan: drop checking if _deferred_list is empty
 before using TTU_SYNC

On 30/06/2024 00:41, Barry Song wrote:
> From: Barry Song <v-songbaohua@...o.com>
> 
> The optimization of list_empty(&folio->_deferred_list) aimed to prevent
> increasing the PTL duration when a large folio is partially unmapped,
> for example, from subpage 0 to subpage (nr - 2).
> 
> But Ryan's commit 5ed890ce5147 ("mm: vmscan: avoid split during
> shrink_folio_list()") actually splits this kind of large folios. This
> makes the "optimization" useless.
> 
> Signed-off-by: Barry Song <v-songbaohua@...o.com>
> Cc: David Hildenbrand <david@...hat.com>
> Cc: Ryan Roberts <ryan.roberts@....com>

Reviewed-by: Ryan Roberts <ryan.roberts@....com>

> ---
>  -v1
>  * I remember David and Ryan once suggested that this check could be dropped
>    while the patch was being pulled into mm-unstable. However, for some reason,
>    I forgot to request squashing this change.
> 
>  mm/vmscan.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index 3d4c681c6d40..0761f91b407f 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -1291,7 +1291,7 @@ static unsigned int shrink_folio_list(struct list_head *folio_list,
>  			 * try_to_unmap acquire PTL from the first PTE,
>  			 * eliminating the influence of temporary PTE values.
>  			 */
> -			if (folio_test_large(folio) && list_empty(&folio->_deferred_list))
> +			if (folio_test_large(folio))

As it stands, the list_empty() technically needs a data_race() annotation. I
think your original patch went into v6.10-rc1? If so, perhaps it makes sense to
try to get this into the next rc?

>  				flags |= TTU_SYNC;
>  
>  			try_to_unmap(folio, flags);


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ