Linux Power Management development
 help / color / mirror / Atom feed
From: Askar Safin <safinaskar@gmail.com>
To: superm1@kernel.org
Cc: lenb@kernel.org, linux-pm@vger.kernel.org,
	mario.limonciello@amd.com, pavel@kernel.org,
	rafael.j.wysocki@intel.com, rafael@kernel.org,
	safinaskar@gmail.com
Subject: Re: [PATCH] PM: hibernate: Restore GFP mask in power_down() for HIBERNATION_PLATFORM
Date: Tue, 28 Oct 2025 14:17:30 +0300	[thread overview]
Message-ID: <20251028111730.2261404-1-safinaskar@gmail.com> (raw)
In-Reply-To: <20251026033115.436448-1-superm1@kernel.org>

"Mario Limonciello (AMD)" <superm1@kernel.org>:
> commit 449c9c02537a1 ("PM: hibernate: Restrict GFP mask in
> hibernation_snapshot()") added a restrict GFP mask call that leads to
> mismatch when using the platform for hibernation.  As part of calling
> hibernation_platform_enter() the mask will be restricted when calling
> dpm_suspend_start().

Are you sure this is proper solution?

As well as I understand, pm_restore_gfp_mask will make pm_suspended_storage
to return false. And this will enable swapping. Thus it is possible that
we will write some pages to swap after this pm_restore_gfp_mask call, and thus
we will damage swap.

Note: I'm not sure that my explanation is correct. Anyway I think you
should explain in commit message or comment why we will not damage swap
here.

-- 
Askar Safin

  parent reply	other threads:[~2025-10-28 11:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-26  3:31 [PATCH] PM: hibernate: Restore GFP mask in power_down() for HIBERNATION_PLATFORM Mario Limonciello (AMD)
2025-10-26  8:37 ` Askar Safin
2025-10-26 13:05 ` Rafael J. Wysocki
2025-10-28 11:17 ` Askar Safin [this message]
2025-10-28 11:49   ` Rafael J. Wysocki
2025-10-28 12:56     ` Askar Safin
2025-10-28 15:12       ` Rafael J. Wysocki
2025-10-28 21:06         ` Rafael J. Wysocki

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=20251028111730.2261404-1-safinaskar@gmail.com \
    --to=safinaskar@gmail.com \
    --cc=lenb@kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=pavel@kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rafael@kernel.org \
    --cc=superm1@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