Linux Power Management development
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Sasha Levin <sashal@kernel.org>
Cc: patches@lists.linux.dev, stable@vger.kernel.org,
	Mario Limonciello <mario.limonciello@amd.com>,
	Nat Wittstock <nat@fardog.io>, Lucian Langa <lucilanga@7pot.org>,
	"Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
	rafael@kernel.org, len.brown@intel.com, ebiederm@xmission.com,
	linux-pm@vger.kernel.org, kexec@lists.infradead.org
Subject: Re: [PATCH AUTOSEL 6.15 6/8] PM: Restrict swap use to later in the suspend sequence
Date: Tue, 8 Jul 2025 08:39:47 +0200	[thread overview]
Message-ID: <aGy9M3zEX7rgo5sS@duo.ucw.cz> (raw)
In-Reply-To: <20250708000215.793090-6-sashal@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 1856 bytes --]

Hi!

> From: Mario Limonciello <mario.limonciello@amd.com>
> 
> [ Upstream commit 12ffc3b1513ebc1f11ae77d053948504a94a68a6 ]
> 
> Currently swap is restricted before drivers have had a chance to do
> their prepare() PM callbacks. Restricting swap this early means that if
> a driver needs to evict some content from memory into sawp in it's
> prepare callback, it won't be able to.
> 
> On AMD dGPUs this can lead to failed suspends under memory pressure
> situations as all VRAM must be evicted to system memory or swap.
> 
> Move the swap restriction to right after all devices have had a chance
> to do the prepare() callback.  If there is any problem with the sequence,
> restore swap in the appropriate dpm resume callbacks or error handling
> paths.
> 
> Closes: https://github.com/ROCm/ROCK-Kernel-Driver/issues/174
> Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/2362
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> Tested-by: Nat Wittstock <nat@fardog.io>
> Tested-by: Lucian Langa <lucilanga@7pot.org>
> Link: https://patch.msgid.link/20250613214413.4127087-1-superm1@kernel.org
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> Signed-off-by: Sasha Levin <sashal@kernel.org>


> ## Small, Contained Change
> 
> 3. **Minimal Code Changes**: The fix is remarkably simple - it just
>    moves the `pm_restrict_gfp_mask()` call from early in the suspend
>    sequence to after `dpm_prepare()` completes. The changes are:

This is not contained change. It changes environment in which drivers run.

I have strong suspicion that you did not do actual analysis, but let
some kind of LVM "analyze", then signed it with your name. Is my
analysis correct?
								Pavel
-- 
I don't work for Nazis and criminals, and neither should you.
Boycott Putin, Trump, and Musk!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

  parent reply	other threads:[~2025-07-08  6:39 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20250708000215.793090-1-sashal@kernel.org>
2025-07-08  0:02 ` [PATCH AUTOSEL 6.15 6/8] PM: Restrict swap use to later in the suspend sequence Sasha Levin
2025-07-08  6:25   ` Pavel Machek
2025-07-08  6:39   ` Pavel Machek [this message]
2025-07-08 19:13   ` Eric W. Biederman
2025-07-08 19:32   ` Eric W. Biederman
2025-07-08 20:32     ` Sasha Levin
2025-07-08 20:37       ` Pavel Machek
2025-07-08 20:46         ` Willy Tarreau
2025-07-08 20:49           ` Pavel Machek
2025-07-08 21:12           ` Sasha Levin
2025-07-08 21:26             ` Pavel Machek
2025-07-09  5:34             ` Pavel Machek
2025-07-08 20:41       ` Pavel Machek
2025-07-08 21:46       ` Eric W. Biederman
2025-07-08 22:26         ` Sasha Levin
2025-07-09  5:39           ` Pavel Machek
2025-07-09 14:35             ` Mario Limonciello
2025-07-09 16:23           ` Eric W. Biederman
2025-07-09 16:35             ` Mario Limonciello
2025-07-09 16:55               ` Rafael J. Wysocki
2025-07-09 17:37             ` Sasha Levin
2025-07-08 20:38     ` Pavel Machek

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=aGy9M3zEX7rgo5sS@duo.ucw.cz \
    --to=pavel@ucw.cz \
    --cc=ebiederm@xmission.com \
    --cc=kexec@lists.infradead.org \
    --cc=len.brown@intel.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=lucilanga@7pot.org \
    --cc=mario.limonciello@amd.com \
    --cc=nat@fardog.io \
    --cc=patches@lists.linux.dev \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rafael@kernel.org \
    --cc=sashal@kernel.org \
    --cc=stable@vger.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