From: YoungJun Park <youngjun.park@lge.com>
To: Usama Arif <usama.arif@linux.dev>
Cc: linux-pm@vger.kernel.org, linux-mm@kvack.org, rafael@kernel.org,
lenb@kernel.org, pavel@kernel.org, akpm@linux-foundation.org,
chrisl@kernel.org, kasong@tencent.com, shikemeng@huaweicloud.com,
nphamcs@gmail.com, bhe@redhat.com, baohua@kernel.org
Subject: Re: [RFC PATCH 0/2] kernel/power: fix swap device reference handling in hibernation swap path
Date: Fri, 6 Mar 2026 11:48:11 +0900 [thread overview]
Message-ID: <aapAa/A57D7pkASc@yjaykim-PowerEdge-T330> (raw)
In-Reply-To: <20260305202413.1888499-1-usama.arif@linux.dev>
On Thu, Mar 05, 2026 at 12:24:12PM -0800, Usama Arif wrote:
> On Tue, 3 Mar 2026 01:53:32 +0900 Youngjun Park <youngjun.park@lge.com> wrote:
>
> > This series addresses two issues in the hibernation swap path.
> >
> > First, grabbing and releasing the swap device reference on every slot
> > allocation is inefficient across the entire hibernation swap path.
> >
> > Second, 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.
> >
> > The fix is to hold the swap device reference from the point the swap
> > device is looked up, and release it once at each exit path.
> >
> > Patch 1: Release the reference immediately after each slot allocation
> > as a preparatory step.
> > Patch 2: Lift the reference acquisition to the lookup site and place
> > put_swap_device_by_type() at all relevant cleanup paths in
> > swap.c and user.c.
>
> Hello!
>
> I cant comment on the feasibility of the approach, but for proper series,
> you would need to squash the 2 commits, otherwise it would break git
> bisectability.
>
> Thanks
Thanks for the feedback. :D
I have squashed the commits as suggested and sent the v2 patch.
Best regards,
Youngjun Park
prev parent reply other threads:[~2026-03-06 2:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-02 16:53 Youngjun Park
2026-03-02 16:53 ` [RFC PATCH 1/2] mm/swap: release swap reference on each hibernation slot allocation Youngjun Park
2026-03-02 16:53 ` [RFC PATCH 2/2] kernel/power: hold swap device reference across hibernation swap operation Youngjun Park
2026-03-05 20:24 ` [RFC PATCH 0/2] kernel/power: fix swap device reference handling in hibernation swap path Usama Arif
2026-03-06 2:48 ` 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=aapAa/A57D7pkASc@yjaykim-PowerEdge-T330 \
--to=youngjun.park@lge.com \
--cc=akpm@linux-foundation.org \
--cc=baohua@kernel.org \
--cc=bhe@redhat.com \
--cc=chrisl@kernel.org \
--cc=kasong@tencent.com \
--cc=lenb@kernel.org \
--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 \
/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