Re: mm: swapin read-ahead and zram
From: Sergey Senozhatsky
Date: Fri Aug 15 2025 - 02:26:01 EST
On (25/08/15 14:51), Sergey Senozhatsky wrote:
[..]
> For instance, notice how entry 1615265 is read, decompressed, then
> presumably evicted from the memory, and read/decompressed again
> soon after, almost immediately. Also notice how that entry 1615265
> has already went through this cycle 189 times. It's not entirely
> clear why this happens.
>
> As far as I can tell, it seems that these extra zram reads are coming from
> the swapin read-ahead:
> handle_mm_fault
> do_swap_page
> swapin_readahead
> swap_read_folio
> submit_bio_wait
> submit_bio_noacct_nocheck
> __submit_bio
> zram_submit_bio
> zram_read_page
> zram_read_from_zspool
Sorry, I need to correct myself here, it seems that read-ahead win is 1
pretty much all the time in swap_vma_readahead(), so that's probably not
read-ahead after all.