[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2d52b1a5-4c44-4cea-bccf-57972ca79f04@gmail.com>
Date: Mon, 10 Jun 2024 15:14:34 +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: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; }
Powered by blists - more mailing lists