From: Kairui Song <ryncsn@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: kasong@tencent.com,
Kairui Song via B4 Relay <devnull+kasong.tencent.com@kernel.org>,
linux-mm@kvack.org, Chris Li <chrisl@kernel.org>,
Kemeng Shi <shikemeng@huaweicloud.com>,
Nhat Pham <nphamcs@gmail.com>, Baoquan He <bhe@redhat.com>,
Barry Song <baohua@kernel.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Carsten Grohmann <carstengrohmann@gmx.de>,
linux-kernel@vger.kernel.org,
"open list:SUSPEND TO RAM" <linux-pm@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] mm, swap: speed up hibernation allocation and writeout
Date: Mon, 16 Feb 2026 02:25:48 +0800 [thread overview]
Message-ID: <aZIMvN41isdR0JGK@KASONG-MC4> (raw)
In-Reply-To: <20260215090236.b546ef526b9bb6315f7884b8@linux-foundation.org>
On Sun, Feb 15, 2026 at 09:02:36AM +0800, Andrew Morton wrote:
> On Sun, 15 Feb 2026 19:15:05 +0800 Kairui Song via B4 Relay <devnull+kasong.tencent.com@kernel.org> wrote:
>
> > Since commit 0ff67f990bd4 ("mm, swap: remove swap slot cache"),
> > hibernation has been using the swap slot slow allocation path for
> > simplification, which turns out might cause regression for some
> > devices because the allocator now rotates clusters too often, leading to
> > slower allocation and more random distribution of data.
> >
> > Fast allocation is not complex, so implement hibernation support as
> > well.
> >
> > And reduce the indent of the code too, while at it. It doesn't have to
> > check the device flag, as the allocator will also check the device flag
> > and refuse to allocate if the device is not writable.
> >
> > Test result with Samsung SSD 830 Series (SATA II, 3.0 Gbps) shows the
> > performance is several times better [1]:
> > 6.19: 324 seconds
> > After this series: 35 seconds
>
> 10x is a lot, so I think we should offer this to -stable kernels.
>
> If you agree, could you please prepare a more backportable fix?
> Something minimal, separated from the [2/2] cleanup and without the
> incidental whitespace alteration?
Hi Andrew,
I think this is already very close to minimal. But I can send a v3 to
split the indention change in a standalone patch, just to reduce the
LOC changed for stable backport.
I'll also cc stable too. I think we only need to fix for 6.18 and
6.19 right? They will still need manual conflict resolving even
without the indention change. But I can help with that.
next prev parent reply other threads:[~2026-02-15 19:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-15 11:15 [PATCH v2 0/2] mm/swap: hibernate: improve hibernate performance with new allocator Kairui Song via B4 Relay
2026-02-15 11:15 ` [PATCH v2 1/2] mm, swap: speed up hibernation allocation and writeout Kairui Song via B4 Relay
2026-02-15 17:02 ` Andrew Morton
2026-02-15 18:25 ` Kairui Song [this message]
2026-02-15 11:15 ` [PATCH v2 2/2] mm, swap: merge common convention and simplify allocation helper Kairui Song via B4 Relay
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=aZIMvN41isdR0JGK@KASONG-MC4 \
--to=ryncsn@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=baohua@kernel.org \
--cc=bhe@redhat.com \
--cc=carstengrohmann@gmx.de \
--cc=chrisl@kernel.org \
--cc=devnull+kasong.tencent.com@kernel.org \
--cc=kasong@tencent.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-pm@vger.kernel.org \
--cc=nphamcs@gmail.com \
--cc=rafael@kernel.org \
--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