Re: [PATCH v6 2/2] mm: support large folios swap-in for zRAM-like devices
From: Christoph Hellwig
Date: Mon Aug 12 2024 - 04:27:16 EST
The subject feels wrong. Nothing particular about zram, it is all about
SWP_SYNCHRONOUS_IO, so the Subject and commit log should state that.
On Sat, Aug 03, 2024 at 12:20:31AM +1200, Barry Song wrote:
> From: Chuanhua Han <hanchuanhua@xxxxxxxx>
>
> Currently, we have mTHP features, but unfortunately, without support for large
> folio swap-ins, once these large folios are swapped out, they are lost because
> mTHP swap is a one-way process. The lack of mTHP swap-in functionality prevents
Please wrap your commit logs after 73 characters to make them readable.
> +/*
> + * check a range of PTEs are completely swap entries with
> + * contiguous swap offsets and the same SWAP_HAS_CACHE.
> + * ptep must be first one in the range
> + */
Please capitalize the first character of block comments, make them full
sentences and use up all 80 characters.
> + for (i = 1; i < nr_pages; i++) {
> + /*
> + * while allocating a large folio and doing swap_read_folio for the
And also do not go over 80 characters for them, which renders them
really hard to read.
> +static struct folio *alloc_swap_folio(struct vm_fault *vmf)
> +{
> + struct vm_area_struct *vma = vmf->vma;
> +#ifdef CONFIG_TRANSPARENT_HUGEPAGE
Please stub out the entire function.