Re: [PATCH v3 1/2] mm: store zero pages to be swapped out in a bitmap

From: Matthew Wilcox
Date: Mon Jun 10 2024 - 09:08:18 EST


On Mon, Jun 10, 2024 at 01:15:59PM +0100, Usama Arif wrote:
> + if (is_folio_zero_filled(folio)) {
> + swap_zeromap_folio_set(folio);
> + folio_start_writeback(folio);
> + folio_unlock(folio);
> + folio_end_writeback(folio);

What's the point? As far as I can see, the only thing this is going to
do is spend a lot of time messing with various counters only to end up
with incrementing NR_WRITTEN, which is wrong because you didn't actually
write it.