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: <227d931f-18b8-48d5-8306-64940fcf1425@gmail.com>
Date: Tue, 11 Jun 2024 16:59:11 +0100
From: Usama Arif <usamaarif642@...il.com>
To: Chengming Zhou <chengming.zhou@...ux.dev>, akpm@...ux-foundation.org
Cc: willy@...radead.org, hannes@...xchg.org, yosryahmed@...gle.com,
 nphamcs@...il.com, linux-mm@...ck.org, linux-kernel@...r.kernel.org,
 kernel-team@...a.com, Shakeel Butt <shakeel.butt@...ux.dev>
Subject: Re: [PATCH] mm: Do not start/end writeback for pages stored in zswap


On 11/06/2024 10:53, Chengming Zhou wrote:
> On 2024/6/10 22:30, Usama Arif wrote:
>> start/end writeback combination incorrectly increments NR_WRITTEN
>> counter, eventhough the pages aren't written to disk. Pages successfully
>> stored in zswap should just unlock folio and return from writepage.
>>
>> Signed-off-by: Usama Arif <usamaarif642@...il.com>
> Looks good to me, thanks.
>
> Reviewed-by: Chengming Zhou <chengming.zhou@...ux.dev>


Fororgot to add:

Suggested-by: Matthew Wilcox (Oracle) <willy@...radead.org>

>
>> ---
>>   mm/page_io.c | 2 --
>>   1 file changed, 2 deletions(-)
>>
>> diff --git a/mm/page_io.c b/mm/page_io.c
>> index a360857cf75d..501784d79977 100644
>> --- a/mm/page_io.c
>> +++ b/mm/page_io.c
>> @@ -196,9 +196,7 @@ int swap_writepage(struct page *page, struct writeback_control *wbc)
>>   		return ret;
>>   	}
>>   	if (zswap_store(folio)) {
>> -		folio_start_writeback(folio);
>>   		folio_unlock(folio);
>> -		folio_end_writeback(folio);
>>   		return 0;
>>   	}
>>   	if (!mem_cgroup_zswap_writeback_enabled(folio_memcg(folio))) {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ