Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Baoquan He <baoquan.he@linux.dev>
To: Christoph Hellwig <hch@lst.de>
Cc: akpm@linux-foundation.org, chrisl@kernel.org,
	usama.arif@linux.dev, kasong@tencent.com, nphamcs@gmail.com,
	shikemeng@huaweicloud.com, youngjun.park@lge.com,
	linux-mm@kvack.org
Subject: Re: [PATCH 2/7] mm/swap: introduce struct swap_io_ctx
Date: Tue, 14 Jul 2026 09:26:10 +0800	[thread overview]
Message-ID: <alWQMssVSvO8Zp1U@MiWiFi-R3L-srv> (raw)
In-Reply-To: <20260713093350.2154226-3-hch@lst.de>

Hi Chrisoph,

On 07/13/26 at 11:33am, Christoph Hellwig wrote:
......snip...
> @@ -212,15 +212,15 @@ static int swapin_walk_pmd_entry(pmd_t *pmd, unsigned long start,
>  		pte_unmap_unlock(ptep, ptl);
>  		ptep = NULL;
>  
> -		folio = read_swap_cache_async(entry, GFP_HIGHUSER_MOVABLE,
> -					     vma, addr, &splug);
> +		folio = read_swap_cache_async(&ctx, entry, GFP_HIGHUSER_MOVABLE,
> +					vma, addr);

Could you please help answer the question in v2?
https://lore.kernel.org/all/aiFaWmCWgEWAFj4W@MiWiFi-R3L-srv/T/#u

It's not clear to me why ctx need be put at the 1st parameter. And if
only replace &splug with &ctx, there will be one less line of code
change, and this applies to other places of change.


...snip...


  reply	other threads:[~2026-07-14  1:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-13  9:33 better block swap batching and a different take on swap_ops v5 Christoph Hellwig
2026-07-13  9:33 ` [PATCH 1/7] shmem: provide a shmem_write_folio wrapper Christoph Hellwig
2026-07-13  9:33 ` [PATCH 2/7] mm/swap: introduce struct swap_io_ctx Christoph Hellwig
2026-07-14  1:26   ` Baoquan He [this message]
2026-07-14  5:06     ` Christoph Hellwig
2026-07-13  9:33 ` [PATCH 3/7] mm/swap: also use struct swap_iocb for block I/O Christoph Hellwig
2026-07-13  9:33 ` [PATCH 4/7] mm/swap: remove count_swpout_vm_event Christoph Hellwig
2026-07-13  9:33 ` [PATCH 5/7] mm/swap: use swap_ops to register swap device's methods Christoph Hellwig
2026-07-13  9:33 ` [PATCH 6/7] mm/swap: remove SWP_FS_OPS Christoph Hellwig
2026-07-13  9:33 ` [PATCH 7/7] mm/vmstat: add NRSWP{IN,OUT} counters Christoph Hellwig
2026-07-13 20:13 ` better block swap batching and a different take on swap_ops v5 Andrew Morton
2026-07-14  5:12   ` Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2026-07-10  6:39 better block swap batching and a different take on swap_ops v4 Christoph Hellwig
2026-07-10  6:39 ` [PATCH 2/7] mm/swap: introduce struct swap_io_ctx Christoph Hellwig
2026-07-06 13:21 better block swap batching and a different take on swap_ops v3 Christoph Hellwig
2026-07-06 13:21 ` [PATCH 2/7] mm/swap: introduce struct swap_io_ctx Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alWQMssVSvO8Zp1U@MiWiFi-R3L-srv \
    --to=baoquan.he@linux.dev \
    --cc=akpm@linux-foundation.org \
    --cc=chrisl@kernel.org \
    --cc=hch@lst.de \
    --cc=kasong@tencent.com \
    --cc=linux-mm@kvack.org \
    --cc=nphamcs@gmail.com \
    --cc=shikemeng@huaweicloud.com \
    --cc=usama.arif@linux.dev \
    --cc=youngjun.park@lge.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox