On Mon, Jun 10, 2024 at 02:56:09PM +0100, Usama Arif wrote:
I am guessing what you are suggesting is just do this?Right.
if (is_folio_zero_filled(folio)) {
swap_zeromap_folio_set(folio);
folio_unlock(folio);
return 0;
}
Will send the below diff as a separate patch for zswap:If we have zswap enabled, the zero filled pages (infact any page that isWe should fiz zswap too.
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).