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] [day] [month] [year] [list]
Message-Id: <20240925135111.4a82c0a126114d3f8bcc7abd@linux-foundation.org>
Date: Wed, 25 Sep 2024 13:51:11 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Zhiguo Jiang <justinjiang@...o.com>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
 opensource.kernel@...o.com
Subject: Re: [PATCH] mm: fix shrink nr.unqueued_dirty counter issue

On Fri, 12 Jan 2024 09:23:52 +0800 Zhiguo Jiang <justinjiang@...o.com> wrote:

> It is needed to ensure sc->nr.unqueued_dirty > 0, which can avoid to
> set PGDAT_DIRTY flag when sc->nr.unqueued_dirty and sc->nr.file_taken
> are both zero at the same time.
> 
> ...
>
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -5957,7 +5957,8 @@ static void shrink_node(pg_data_t *pgdat, struct scan_control *sc)
>  			set_bit(PGDAT_WRITEBACK, &pgdat->flags);
>  
>  		/* Allow kswapd to start writing pages during reclaim.*/
> -		if (sc->nr.unqueued_dirty == sc->nr.file_taken)
> +		if (sc->nr.unqueued_dirty &&
> +			sc->nr.unqueued_dirty == sc->nr.file_taken)
>  			set_bit(PGDAT_DIRTY, &pgdat->flags);
>  

Seems sensible.  Was this discovered by code inspection, or is there
some observable runtime effect?  If the latter, can you please describe
that effect?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ