Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Youngjun Park <youngjun.park@lge.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Chris Li <chrisl@kernel.org>, Kairui Song <kasong@tencent.com>,
	Kemeng Shi <shikemeng@huaweicloud.com>,
	Nhat Pham <nphamcs@gmail.com>, Baoquan He <baoquan.he@linux.dev>,
	Barry Song <baohua@kernel.org>,
	her0gyugyu@gmail.com, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 0/2] mm/swap: skip empty clusters in the swapoff scan
Date: Thu, 10 Sep 2026 10:45:54 +0900	[thread overview]
Message-ID: <aqIL0nNT/RF67PIN@yjaykim-PowerEdge-T330> (raw)
In-Reply-To: <20260909104939.5203c02695fcfd7a95f4b26c@linux-foundation.org>

On Wed, Sep 09, 2026 at 10:49:39AM -0700, Andrew Morton wrote:
> On Thu, 10 Sep 2026 01:15:50 +0900 Youngjun Park <youngjun.park@lge.com> wrote:
> 
> > find_next_to_unuse() walks a swap device one offset at a time.  Slot
> > state now lives in a per cluster swap table, so patch 2 dismisses an
> > empty cluster with one counter read instead of SWAPFILE_CLUSTER table
> > reads.
> > 
> > Patch 1 is an unrelated one line comment fix noticed on the way.
> > 
> > A debug test confirmed the skip path runs, and swapoff completed
> > under load with no DEBUG_VM or lockdep splats.
> 
> Please let's try to make the [0/N] words provide a summary of the
> patchset's effects.  The above didn't even tell people that this is a
> swapoff optimization!

Hello Andrew.

I will keep in mind, Thank you for pointing it out.

> I asked an LLM for this summary and we came up with
> 
> :  Speed up swapoff and reduce scanning stalls on large, mostly empty
> :  swap devices by skipping empty clusters.  Reduce swapoff time on a 1
> :  TiB device from 158 ms to 94 ms after filling 128 GiB, and from 392
> :  ms to 73 ms after filling 512 GiB; expect little benefit when
> :  substantial swap data remains.
> 
> Does that sound OK?

Yes, sounds good. summary seems good enough!

Best regards,
Youngjun


      reply	other threads:[~2026-09-10  1:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-09 16:15 [PATCH v4 0/2] mm/swap: skip empty clusters in the swapoff scan Youngjun Park
2026-09-09 16:15 ` [PATCH v4 1/2] mm/swap: fix stale comment on swap_info_struct::cluster_info Youngjun Park
2026-09-09 16:15 ` [PATCH v4 2/2] mm/swap: scan by cluster in find_next_to_unuse() Youngjun Park
2026-09-09 18:44   ` Nhat Pham
2026-09-09 17:49 ` [PATCH v4 0/2] mm/swap: skip empty clusters in the swapoff scan Andrew Morton
2026-09-10  1:45   ` Youngjun Park [this message]

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=aqIL0nNT/RF67PIN@yjaykim-PowerEdge-T330 \
    --to=youngjun.park@lge.com \
    --cc=akpm@linux-foundation.org \
    --cc=baohua@kernel.org \
    --cc=baoquan.he@linux.dev \
    --cc=chrisl@kernel.org \
    --cc=her0gyugyu@gmail.com \
    --cc=kasong@tencent.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=nphamcs@gmail.com \
    --cc=shikemeng@huaweicloud.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