public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: YoungJun Park <youngjun.park@lge.com>
To: Matthew Leach <matthew.leach@collabora.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
	Pavel Machek <pavel@kernel.org>, Len Brown <lenb@kernel.org>,
	Mario Limonciello <mario.limonciello@amd.com>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel@collabora.com
Subject: Re: [PATCH] PM: hibernate: call preallocate_image after freeze prepare
Date: Tue, 24 Mar 2026 00:23:19 +0900	[thread overview]
Message-ID: <acFa5+ihROC9/0Va@yjaykim-PowerEdge-T330> (raw)
In-Reply-To: <20260321-hibernation-fixes-v1-1-5fe9637b6ff9@collabora.com>

On Sat, Mar 21, 2026 at 08:51:31AM +0000, Matthew Leach wrote:

Hi Matthew,

> +     /* Preallocate image memory before shutting down devices. */
> +     error = hibernate_preallocate_memory();

The shrink_shmem_memory() below is also intended to run after
dpm_prepare(), and the motivation is the same. Since
hibernate_preallocate_memory() already does shrinking internally,
how about pulling out the shrink-related parts and consolidating
them together?

> +     if (error)
> +             goto Thaw;

Don't we need to call dpm_complete(PMSG_RECOVER) in this error path?

>  Thaw:
>       thaw_kernel_threads();
> - Cleanup:
> -     swsusp_free();
>       goto Close;

Thanks,
Youngjun Park

  reply	other threads:[~2026-03-23 15:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-21  8:51 [PATCH] PM: hibernate: call preallocate_image after freeze prepare Matthew Leach
2026-03-23 15:23 ` YoungJun Park [this message]
2026-03-24  9:22   ` Matthew Leach

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=acFa5+ihROC9/0Va@yjaykim-PowerEdge-T330 \
    --to=youngjun.park@lge.com \
    --cc=kernel@collabora.com \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=matthew.leach@collabora.com \
    --cc=pavel@kernel.org \
    --cc=rafael@kernel.org \
    /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