From: Andrew Morton <akpm@linux-foundation.org>
To: Youngjun Park <youngjun.park@lge.com>
Cc: rafael@kernel.org, chrisl@kernel.org, kasong@tencent.com,
pavel@kernel.org, shikemeng@huaweicloud.com, nphamcs@gmail.com,
bhe@redhat.com, baohua@kernel.org, usama.arif@linux.dev,
linux-pm@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH v7 0/2] mm/swap, PM: hibernate: fix swapoff race and optimize swap
Date: Sat, 21 Mar 2026 10:59:21 -0700 [thread overview]
Message-ID: <20260321105921.19388b7acbc0f8d6036e29a7@linux-foundation.org> (raw)
In-Reply-To: <20260321103309.439265-1-youngjun.park@lge.com>
On Sat, 21 Mar 2026 19:33:07 +0900 Youngjun Park <youngjun.park@lge.com> wrote:
> Apologies for the frequent revisions. Hopefully this version is close to final.
>
> Currently, in the uswsusp path, only the swap type value is retrieved at
> lookup time without holding a reference. If swapoff races after the type
> is acquired, subsequent slot allocations operate on a stale swap device.
>
> Additionally, grabbing and releasing the swap device reference on every
> slot allocation is inefficient across the entire hibernation swap path.
>
> This patch series addresses these issues:
> - Patch 1: Fixes the swapoff race in uswsusp by pinning the swap device
> from the point it is looked up until the session completes.
> - Patch 2: Removes the overhead of per-slot reference counting in alloc/free
> paths and cleans up the redundant SWP_WRITEOK check.
>
> ...
>
> v6 -> v7:
> - Dropped Patch 3 (pm_restore_gfp_mask fix) from series as it has
> no dependency on Patches 1-2. Will be sent separately.
> (Rafael J. Wysocki feedback)
> - Andrew Morton's AI review
Well. Roman, Chris, Google and others. I'm just a messenger ;)
> findings applied only to Patch 3;
> Patches 1-2 are unchanged. (no problem on AI's review)
Seems that it changed its mind!
https://sashiko.dev/#/patchset/20260321103309.439265-1-youngjun.park@lge.com
next prev parent reply other threads:[~2026-03-21 17:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-21 10:33 Youngjun Park
2026-03-21 10:33 ` [PATCH v7 1/2] mm/swap, PM: hibernate: fix swapoff race in uswsusp by pinning swap device Youngjun Park
2026-03-21 10:33 ` [PATCH v7 2/2] mm/swap: remove redundant swap device reference in alloc/free Youngjun Park
2026-03-21 17:59 ` Andrew Morton [this message]
2026-03-22 10:31 ` [PATCH v7 0/2] mm/swap, PM: hibernate: fix swapoff race and optimize swap YoungJun Park
2026-03-22 16:30 ` Andrew Morton
2026-03-23 19:56 ` Andrew Morton
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=20260321105921.19388b7acbc0f8d6036e29a7@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=baohua@kernel.org \
--cc=bhe@redhat.com \
--cc=chrisl@kernel.org \
--cc=kasong@tencent.com \
--cc=linux-mm@kvack.org \
--cc=linux-pm@vger.kernel.org \
--cc=nphamcs@gmail.com \
--cc=pavel@kernel.org \
--cc=rafael@kernel.org \
--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