Re: [PATCH 4/4] mm: swap: entirely map large folios found in swapcache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Barry Song <21cnbao@xxxxxxxxx> writes:

> From: Chuanhua Han <hanchuanhua@xxxxxxxx>
>
> When a large folio is found in the swapcache, the current implementation
> requires calling do_swap_page() nr_pages times, resulting in nr_pages
> page faults. This patch opts to map the entire large folio at once to
> minimize page faults. Additionally, redundant checks and early exits
> for ARM64 MTE restoring are removed.

For large folios in reclaiming, it makes sense to restore all PTE
mappings to the large folio to reduce the number of page faults.

But for large folios swapped in, I think that it's better to map one PTE
which triggers the page fault only.  Because this makes us get the
opportunity to trap the page accesses to the sub-pages of the large
folio that is swapped in ahead (kind of swap readahead).  Then we can
decide the order of large folio swapin based on the readahead window
information.  That is, we may need to check PageReadahead() to decide
whether to map all PTEs in the future.

--
Best Regards,
Huang, Ying




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux