linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Kairui Song <ryncsn@gmail.com>
To: carstengrohmann@gmx.de, Andrew Morton <akpm@linux-foundation.org>
Cc: bugzilla-daemon@kernel.org, Kairui Song <kasong@tencent.com>,
	 Baoquan He <bhe@redhat.com>, Nhat Pham <nphamcs@gmail.com>,
	 Yosry Ahmed <yosryahmed@google.com>,
	linux-mm@kvack.org
Subject: Re: [Bug 221055] New: Hibernate image write 10x slower since commit 0ff67f990bd4 ("mm,  swap: remove swap slot cache")
Date: Wed, 11 Feb 2026 02:39:48 +0800	[thread overview]
Message-ID: <aYt4RwxqH1W_zHez@KASONG-MC4> (raw)
In-Reply-To: <20260206121151.dea3633d1f0ded7bbf49c22e@linux-foundation.org>

On Fri, Feb 06, 2026 at 12:11:51PM +0800, Andrew Morton wrote:
> On Fri, 06 Feb 2026 19:51:38 +0000 bugzilla-daemon@kernel.org wrote:
> 
> > https://bugzilla.kernel.org/show_bug.cgi?id=221055
> 
> Dear Deity, I do wish kernel MM bugzilla would just go away.  Sigh.
> 
> Canned response follows:
> 
> (switched to email.  Please respond via emailed reply-to-all, not via the
> bugzilla web interface).
> 
> 
> >             Bug ID: 221055
> >            Summary: Hibernate image write 10x slower since commit
> >                     0ff67f990bd4 ("mm,  swap: remove swap slot cache")
> >            Product: Memory Management
> >            Version: 2.5
> >           Hardware: All
> >                 OS: Linux
> >             Status: NEW
> >           Severity: normal
> >           Priority: P3
> >          Component: Other
> >           Assignee: akpm@linux-foundation.org
> >           Reporter: carstengrohmann@gmx.de
> >         Regression: No
> > 
> > === Summary ===
> > 
> > Hibernate image write 10x slower since commit 0ff67f990bd4 ("mm, 
> > swap: remove swap slot cache")
> 
> Thanks for all the work you put into this.

Thanks for letting me know!

> 
> > === Description ===
> > 
> > Since kernel 6.15, writing the hibernate image to swap has become
> > approximately 10x slower. The regression was introduced by commit
> > 0ff67f990bd45726e0d9e91111d998e7a3595b32 ("mm, swap: remove swap slot
> > cache") authored by Kairui Song and merged by Andrew Morton.
> > 
> > === Performance Data ===
> > 
> >                  Before (6.14)   After (6.15+)
> > Hibernate        28-32 seconds   290-342 seconds
> > Effective rate   ~60 MB/s        ~4.5 MB/s
> > 
> > The swap partition's raw sequential write speed (measured with dd)
> > is 255-450 MB/s, confirming the hardware is not the bottleneck.
> > 
> > === Bisect Result ===
> > 
> > A full git bisect on the vanilla kernel repository
> > (git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git)
> > between v6.14 (good) and v6.15 (bad) with 14 iterations
> > consistently identified this commit:
> > 
> >   # first bad commit: [0ff67f990bd45726e0d9e91111d998e7a3595b32]
> >   #   mm, swap: remove swap slot cache

Oh, I took a look and I think I know the problem now, the new added
fast path in that series is only used by allocation from vmscan,
for hibernation it always use the slow path, as I didn't expect the
slow path is below hibernation's requirement.

Or maybe, it not the allocation path that is slow, but because
cluster rotation in slow path splatted the allocation to every
cluster makes the IO much slower.

Both are not too hard to fix. Is that's SSD only issue? And
should we fix this in every LTS or just mainline? It could
be a bit trouble some if every LTS needs a fix.


  reply	other threads:[~2026-02-10 18:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-221055-27@https.bugzilla.kernel.org/>
2026-02-06 20:11 ` Andrew Morton
2026-02-10 18:39   ` Kairui Song [this message]
2026-02-12 19:01     ` Kairui Song
2026-02-12 20:37       ` Carsten Grohmann
2026-02-13  2:21         ` Kairui Song
2026-02-15  8:56         ` Carsten Grohmann
2026-02-15  9:25           ` Kairui Song

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=aYt4RwxqH1W_zHez@KASONG-MC4 \
    --to=ryncsn@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=bhe@redhat.com \
    --cc=bugzilla-daemon@kernel.org \
    --cc=carstengrohmann@gmx.de \
    --cc=kasong@tencent.com \
    --cc=linux-mm@kvack.org \
    --cc=nphamcs@gmail.com \
    --cc=yosryahmed@google.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