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: <1ca65f97-572a-412a-b6fa-b1e811592094@gmail.com>
Date: Mon, 10 Jun 2024 15:33:59 +0100
From: Usama Arif <usamaarif642@...il.com>
To: Matthew Wilcox <willy@...radead.org>, hannes@...xchg.org,
 yosryahmed@...gle.com, nphamcs@...il.com
Cc: akpm@...ux-foundation.org, david@...hat.com, ying.huang@...el.com,
 hughd@...gle.com, chengming.zhou@...ux.dev, linux-mm@...ck.org,
 linux-kernel@...r.kernel.org, kernel-team@...a.com
Subject: Re: [PATCH v3 1/2] mm: store zero pages to be swapped out in a bitmap


On 10/06/2024 15:14, Usama Arif wrote:
>
> On 10/06/2024 15:06, Matthew Wilcox wrote:
>> On Mon, Jun 10, 2024 at 02:56:09PM +0100, Usama Arif wrote:
>>> I am guessing what you are suggesting is just do this?
>>>
>>>      if (is_folio_zero_filled(folio)) {
>>>          swap_zeromap_folio_set(folio);
>>>          folio_unlock(folio);
>>>          return 0;
>>>      }
>> Right.
>
> Thanks! Will change to this in the next revision.
>
>>> If we have zswap enabled, the zero filled pages (infact any page 
>>> that is
>>> compressed), will be saved in zswap_entry and NR_WRITTEN will be 
>>> wrongly
>>> incremented. So the behaviour for NR_WRITTEN does not change in this 
>>> patch
>>> when encountering zero pages with zswap enabled (even if its wrong).
>> We should fiz zswap too.
>>
> Will send the below diff as a separate patch for zswap:
>
> diff --git a/mm/page_io.c b/mm/page_io.c index 
> 2cac1e11fb85..82796b9f08c7 100644 --- a/mm/page_io.c +++ 
> b/mm/page_io.c @@ -281,9 +281,7 @@ int swap_writepage(struct page 
> *page, struct writeback_control *wbc) } 
> swap_zeromap_folio_clear(folio); if (zswap_store(folio)) { - 
> folio_start_writeback(folio); folio_unlock(folio); - 
> folio_end_writeback(folio); return 0; }
>

My mail client seems to have messed up the diff, but have sent the patch 
here 
(https://lore.kernel.org/all/20240610143037.812955-1-usamaarif642@gmail.com/). 
Tested with test_zswap kselftest.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ