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: <20231229114439.e3f3a33652fdc1e6df666ab5@linux-foundation.org>
Date: Fri, 29 Dec 2023 11:44:39 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Zhongkun He <hezhongkun.hzk@...edance.com>
Cc: hannes@...xchg.org, yosryahmed@...gle.com, nphamcs@...il.com,
 sjenning@...hat.com, ddstreet@...e.org, vitaly.wool@...sulko.com,
 linux-mm@...ck.org, linux-kernel@...r.kernel.org, Chengming Zhou
 <zhouchengming@...edance.com>, Chris Li <chrisl@...nel.org>, Nhat Pham
 <nphamcs@...il.com>, Yosry Ahmed <yosryahmed@...gle.com>
Subject: Re: [PATCH] mm: zswap: fix the lack of page lru flag in 
 zswap_writeback_entry

On Tue, 24 Oct 2023 22:27:06 +0800 Zhongkun He <hezhongkun.hzk@...edance.com> wrote:

> The zswap_writeback_entry() will add a page to the swap cache, decompress
> the entry data into the page, and issue a bio write to write the page back
> to the swap device. Move the page to the tail of lru list  through
> SetPageReclaim(page) and folio_rotate_reclaimable().
> 
> Currently, about half of the pages will fail to move to the tail of lru
> list because there is no LRU flag in page which is not in the LRU list but
> the cpu_fbatches. So fix it.

Some reviewer input on this change would be helpful, please.

Also, is there any measurable change in overall performance?

> --- a/mm/zswap.c
> +++ b/mm/zswap.c
> @@ -1139,6 +1139,11 @@ static int zswap_writeback_entry(struct zswap_entry *entry,
>  	/* move it to the tail of the inactive list after end_writeback */
>  	SetPageReclaim(page);
>  
> +	if (!PageLRU(page)) {
> +		/* drain lru cache to help folio_rotate_reclaimable() */
> +		lru_add_drain();
> +	}
> +
>  	/* start writeback */
>  	__swap_writepage(page, &wbc);
>  	put_page(page);
> -- 
> 2.25.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ