* [PATCH AUTOSEL 6.15 6/8] PM: Restrict swap use to later in the suspend sequence
[not found] <20250708000215.793090-1-sashal@kernel.org>
@ 2025-07-08 0:02 ` Sasha Levin
2025-07-08 6:25 ` Pavel Machek
` (3 more replies)
0 siblings, 4 replies; 22+ messages in thread
From: Sasha Levin @ 2025-07-08 0:02 UTC (permalink / raw)
To: patches, stable
Cc: Mario Limonciello, Nat Wittstock, Lucian Langa,
Rafael J . Wysocki, Sasha Levin, rafael, pavel, len.brown,
ebiederm, linux-pm, kexec
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>
---
**YES**
This commit should be backported to stable kernel trees for the
following reasons:
## Critical Bug Fix for Real User Issues
1. **Fixes Actual Suspend Failures**: The commit addresses real-world
suspend failures under memory pressure on systems with AMD discrete
GPUs. The linked issues (ROCm/ROCK-Kernel-Driver#174 and
freedesktop.org/drm/amd#2362) indicate this affects actual users.
2. **Regression Fix**: This is effectively a regression fix. The PM
subsystem's early swap restriction prevents AMD GPU drivers from
properly evicting VRAM during their prepare() callbacks, which is a
requirement that has become more critical as GPU VRAM sizes have
increased.
## 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:
- Move `pm_restrict_gfp_mask()` from multiple early locations to
inside `dpm_suspend_start()` after `dpm_prepare()` succeeds
- Add corresponding `pm_restore_gfp_mask()` calls in error paths and
resume paths
- Remove the now-redundant calls from hibernate.c and suspend.c
4. **Low Risk of Regression**: The change maintains the original intent
of preventing I/O during the critical suspend phase while allowing it
during device preparation. The swap restriction still happens before
`dpm_suspend()`, just after `dpm_prepare()`.
## Follows Stable Rules
5. **Meets Stable Criteria**:
- Fixes a real bug that bothers people (suspend failures)
- Small change (moves function calls, doesn't introduce new logic)
- Obviously correct (allows drivers to use swap during their
designated preparation phase)
- Already tested by users (Tested-by tags from affected users)
## Similar to Other Backported Commits
6. **Pattern Matches**: Looking at the similar commits provided, this
follows the same pattern as the AMD GPU eviction commits that were
backported. Those commits also addressed the same fundamental issue -
ensuring GPU VRAM can be properly evicted during suspend/hibernation.
## Critical Timing
7. **Error Path Handling**: The commit properly handles error paths by
adding `pm_restore_gfp_mask()` calls in:
- `dpm_resume_end()` for normal resume
- `platform_recover()` error path in suspend.c
- `pm_restore_gfp_mask()` in kexec_core.c for kexec flows
The commit is well-tested, addresses a real problem affecting users, and
makes a minimal, obviously correct change to fix suspend failures on
systems with discrete GPUs under memory pressure.
drivers/base/power/main.c | 5 ++++-
include/linux/suspend.h | 5 +++++
kernel/kexec_core.c | 1 +
kernel/power/hibernate.c | 3 ---
kernel/power/power.h | 5 -----
kernel/power/suspend.c | 3 +--
6 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
index 1926454c7a7e8..dd1efa95bcf15 100644
--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@ -1182,6 +1182,7 @@ void dpm_complete(pm_message_t state)
*/
void dpm_resume_end(pm_message_t state)
{
+ pm_restore_gfp_mask();
dpm_resume(state);
dpm_complete(state);
}
@@ -2015,8 +2016,10 @@ int dpm_suspend_start(pm_message_t state)
error = dpm_prepare(state);
if (error)
dpm_save_failed_step(SUSPEND_PREPARE);
- else
+ else {
+ pm_restrict_gfp_mask();
error = dpm_suspend(state);
+ }
dpm_show_time(starttime, state, error, "start");
return error;
diff --git a/include/linux/suspend.h b/include/linux/suspend.h
index da6ebca3ff774..d638f31dc32cd 100644
--- a/include/linux/suspend.h
+++ b/include/linux/suspend.h
@@ -441,6 +441,8 @@ extern int unregister_pm_notifier(struct notifier_block *nb);
extern void ksys_sync_helper(void);
extern void pm_report_hw_sleep_time(u64 t);
extern void pm_report_max_hw_sleep(u64 t);
+void pm_restrict_gfp_mask(void);
+void pm_restore_gfp_mask(void);
#define pm_notifier(fn, pri) { \
static struct notifier_block fn##_nb = \
@@ -485,6 +487,9 @@ static inline int unregister_pm_notifier(struct notifier_block *nb)
static inline void pm_report_hw_sleep_time(u64 t) {};
static inline void pm_report_max_hw_sleep(u64 t) {};
+static inline void pm_restrict_gfp_mask(void) {}
+static inline void pm_restore_gfp_mask(void) {}
+
static inline void ksys_sync_helper(void) {}
#define pm_notifier(fn, pri) do { (void)(fn); } while (0)
diff --git a/kernel/kexec_core.c b/kernel/kexec_core.c
index 3e62b944c8833..2972278497b0b 100644
--- a/kernel/kexec_core.c
+++ b/kernel/kexec_core.c
@@ -1082,6 +1082,7 @@ int kernel_kexec(void)
Resume_devices:
dpm_resume_end(PMSG_RESTORE);
Resume_console:
+ pm_restore_gfp_mask();
console_resume_all();
thaw_processes();
Restore_console:
diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
index 5af9c7ee98cd4..0bb5a7befe944 100644
--- a/kernel/power/hibernate.c
+++ b/kernel/power/hibernate.c
@@ -418,7 +418,6 @@ int hibernation_snapshot(int platform_mode)
}
console_suspend_all();
- pm_restrict_gfp_mask();
error = dpm_suspend(PMSG_FREEZE);
@@ -554,7 +553,6 @@ int hibernation_restore(int platform_mode)
pm_prepare_console();
console_suspend_all();
- pm_restrict_gfp_mask();
error = dpm_suspend_start(PMSG_QUIESCE);
if (!error) {
error = resume_target_kernel(platform_mode);
@@ -566,7 +564,6 @@ int hibernation_restore(int platform_mode)
BUG_ON(!error);
}
dpm_resume_end(PMSG_RECOVER);
- pm_restore_gfp_mask();
console_resume_all();
pm_restore_console();
return error;
diff --git a/kernel/power/power.h b/kernel/power/power.h
index f8496f40b54fa..6037090578b71 100644
--- a/kernel/power/power.h
+++ b/kernel/power/power.h
@@ -235,11 +235,6 @@ static inline void suspend_test_finish(const char *label) {}
/* kernel/power/main.c */
extern int pm_notifier_call_chain_robust(unsigned long val_up, unsigned long val_down);
extern int pm_notifier_call_chain(unsigned long val);
-void pm_restrict_gfp_mask(void);
-void pm_restore_gfp_mask(void);
-#else
-static inline void pm_restrict_gfp_mask(void) {}
-static inline void pm_restore_gfp_mask(void) {}
#endif
#ifdef CONFIG_HIGHMEM
diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c
index 8eaec4ab121d4..d22edf9678872 100644
--- a/kernel/power/suspend.c
+++ b/kernel/power/suspend.c
@@ -537,6 +537,7 @@ int suspend_devices_and_enter(suspend_state_t state)
return error;
Recover_platform:
+ pm_restore_gfp_mask();
platform_recover(state);
goto Resume_devices;
}
@@ -600,9 +601,7 @@ static int enter_state(suspend_state_t state)
trace_suspend_resume(TPS("suspend_enter"), state, false);
pm_pr_dbg("Suspending system (%s)\n", mem_sleep_labels[state]);
- pm_restrict_gfp_mask();
error = suspend_devices_and_enter(state);
- pm_restore_gfp_mask();
Finish:
events_check_enabled = false;
--
2.39.5
^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: [PATCH AUTOSEL 6.15 6/8] PM: Restrict swap use to later in the suspend sequence
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
` (2 subsequent siblings)
3 siblings, 0 replies; 22+ messages in thread
From: Pavel Machek @ 2025-07-08 6:25 UTC (permalink / raw)
To: Sasha Levin
Cc: patches, stable, Mario Limonciello, Nat Wittstock, Lucian Langa,
Rafael J . Wysocki, rafael, len.brown, ebiederm, linux-pm, kexec
[-- Attachment #1: Type: text/plain, Size: 2286 bytes --]
On Mon 2025-07-07 20:02:13, Sasha Levin wrote:
> 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>
> ---
>
> **YES**
>
> This commit should be backported to stable kernel trees for the
> following reasons:
>
> ## Critical Bug Fix for Real User Issues
>
> 1. **Fixes Actual Suspend Failures**: The commit addresses real-world
> suspend failures under memory pressure on systems with AMD discrete
> GPUs. The linked issues (ROCm/ROCK-Kernel-Driver#174 and
> freedesktop.org/drm/amd#2362) indicate this affects actual users.
>
> 2. **Regression Fix**: This is effectively a regression fix. The PM
> subsystem's early swap restriction prevents AMD GPU drivers from
> properly evicting VRAM during their prepare() callbacks, which is a
> requirement that has become more critical as GPU VRAM sizes have
> increased.
Stop copying AI generated nonsense to your emails while making it look
you wrote that. When did this regress?
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 --]
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH AUTOSEL 6.15 6/8] PM: Restrict swap use to later in the suspend sequence
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
2025-07-08 19:13 ` Eric W. Biederman
2025-07-08 19:32 ` Eric W. Biederman
3 siblings, 0 replies; 22+ messages in thread
From: Pavel Machek @ 2025-07-08 6:39 UTC (permalink / raw)
To: Sasha Levin
Cc: patches, stable, Mario Limonciello, Nat Wittstock, Lucian Langa,
Rafael J . Wysocki, rafael, len.brown, ebiederm, linux-pm, kexec
[-- 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 --]
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH AUTOSEL 6.15 6/8] PM: Restrict swap use to later in the suspend sequence
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
@ 2025-07-08 19:13 ` Eric W. Biederman
2025-07-08 19:32 ` Eric W. Biederman
3 siblings, 0 replies; 22+ messages in thread
From: Eric W. Biederman @ 2025-07-08 19:13 UTC (permalink / raw)
To: Sasha Levin
Cc: patches, stable, Mario Limonciello, Nat Wittstock, Lucian Langa,
Rafael J . Wysocki, rafael, pavel, len.brown, linux-pm, kexec
Wow!
Sasha I think an impersonator has gotten into your account, and is
just making nonsense up.
This reads like an impassioned plea to backport this change, from
someone who has actually dealt with it.
However reading the justification in detail is an exercise in reading
falehoods.
If this does not come from an impersonator then if this comes
from a human being, I recommend you have a talk with them.
If this comes from a machine I recommend take it out of commission
and rework it.
If I see this kind of baloney again I expect I will just auto-nack
it instead of reading it, as reading it appears to be a waste of
time. It is a complete waste reading fiction in what little time I have
for kernel development.
Eric
Sasha Levin <sashal@kernel.org> writes:
> **YES**
>
> This commit should be backported to stable kernel trees for the
> following reasons:
>
> ## Critical Bug Fix for Real User Issues
>
> 1. **Fixes Actual Suspend Failures**: The commit addresses real-world
> suspend failures under memory pressure on systems with AMD discrete
> GPUs. The linked issues (ROCm/ROCK-Kernel-Driver#174 and
> freedesktop.org/drm/amd#2362) indicate this affects actual users.
The links in the first paragraph are very distorted. The links
from the actual change are:
https://github.com/ROCm/ROCK-Kernel-Driver/issues/174
https://gitlab.freedesktop.org/drm/amd/-/issues/2362
Those completely distorted links make understanding this justification
much harder then necessary.
> 2. **Regression Fix**: This is effectively a regression fix. The PM
> subsystem's early swap restriction prevents AMD GPU drivers from
> properly evicting VRAM during their prepare() callbacks, which is a
> requirement that has become more critical as GPU VRAM sizes have
> increased.
That is a justification. There is no evidence that a kernel change
made this worse. Thus there is no evidence this is a regression fix.
> ## 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:
> - Move `pm_restrict_gfp_mask()` from multiple early locations to
> inside `dpm_suspend_start()` after `dpm_prepare()` succeeds
> - Add corresponding `pm_restore_gfp_mask()` calls in error paths and
> resume paths
> - Remove the now-redundant calls from hibernate.c and suspend.c
Completely wrong.
> 4. **Low Risk of Regression**: The change maintains the original intent
> of preventing I/O during the critical suspend phase while allowing it
> during device preparation. The swap restriction still happens before
> `dpm_suspend()`, just after `dpm_prepare()`.
This is a fundamental change to a susbsystem that the subsystem
maintainer does not say is low risk.
> ## Follows Stable Rules
>
> 5. **Meets Stable Criteria**:
> - Fixes a real bug that bothers people (suspend failures)
Addresses a real bug.
> - Small change (moves function calls, doesn't introduce new logic)
The change is a large change in the logic.
> - Obviously correct (allows drivers to use swap during their
> designated preparation phase)
It obviously changes the behavior. It is not at all obvious
the change is behavior is desirable for all callbacks, and in all
other scenarios.
> - Already tested by users (Tested-by tags from affected users)
Yes it has Tested-by tags.
> ## Similar to Other Backported Commits
>
> 6. **Pattern Matches**: Looking at the similar commits provided, this
> follows the same pattern as the AMD GPU eviction commits that were
> backported. Those commits also addressed the same fundamental issue -
> ensuring GPU VRAM can be properly evicted during suspend/hibernation.
Which commits that were backported?
> ## Critical Timing
Timing??? There is no race condition.
> 7. **Error Path Handling**: The commit properly handles error paths by
> adding `pm_restore_gfp_mask()` calls in:
> - `dpm_resume_end()` for normal resume
> - `platform_recover()` error path in suspend.c
> - `pm_restore_gfp_mask()` in kexec_core.c for kexec flows
>
> The commit is well-tested, addresses a real problem affecting users, and
> makes a minimal, obviously correct change to fix suspend failures on
> systems with discrete GPUs under memory pressure.
What evidence is there that this commit has been tested let alone
well-tested.
The entire line of reasoning is completely suspect.
Eric
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH AUTOSEL 6.15 6/8] PM: Restrict swap use to later in the suspend sequence
2025-07-08 0:02 ` [PATCH AUTOSEL 6.15 6/8] PM: Restrict swap use to later in the suspend sequence Sasha Levin
` (2 preceding siblings ...)
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:38 ` Pavel Machek
3 siblings, 2 replies; 22+ messages in thread
From: Eric W. Biederman @ 2025-07-08 19:32 UTC (permalink / raw)
To: Sasha Levin
Cc: patches, stable, Mario Limonciello, Nat Wittstock, Lucian Langa,
Rafael J . Wysocki, rafael, pavel, len.brown, linux-pm, kexec
Wow!
Sasha I think an impersonator has gotten into your account, and
is just making nonsense up.
At first glance this reads like an impassioned plea to backport this
change, from someone who has actually dealt with it.
Unfortunately reading the justification in detail is an exercise
in reading falsehoods.
If this does not come from an impersonator then:
- If this comes from a human being, I recommend you have a talk with
them.
- If this comes from a machine I recommend you take it out of commission
and rework it.
At best all of this appears to be an effort to get someone else to
do necessary thinking for you. As my time for kernel work is very
limited I expect I will auto-nack any such future attempts to outsource
someone else's thinking on me.
Eric
Sasha Levin <sashal@kernel.org> writes:
> 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>
> ---
>
> **YES**
>
> This commit should be backported to stable kernel trees for the
> following reasons:
Really? And when those reasons turn out to be baloney?
> ## Critical Bug Fix for Real User Issues
>
> 1. **Fixes Actual Suspend Failures**: The commit addresses real-world
> suspend failures under memory pressure on systems with AMD discrete
> GPUs. The linked issues (ROCm/ROCK-Kernel-Driver#174 and
> freedesktop.org/drm/amd#2362) indicate this affects actual users.
Those linked issues are completely corrupted in the paragraph above.
From the original commit the proper issues are:
https://github.com/ROCm/ROCK-Kernel-Driver/issues/174
https://gitlab.freedesktop.org/drm/amd/-/issues/2362
Which indicate that something is going on, but are old enough and
long enough coming to any kind of conclusion from them is not easy.
> 2. **Regression Fix**: This is effectively a regression fix. The PM
> subsystem's early swap restriction prevents AMD GPU drivers from
> properly evicting VRAM during their prepare() callbacks, which is a
> requirement that has become more critical as GPU VRAM sizes have
> increased.
There is no indication that this used to work, or that an earlier
kernel change caused this to stop working. This is not a regression.
> ## 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:
> - Move `pm_restrict_gfp_mask()` from multiple early locations to
> inside `dpm_suspend_start()` after `dpm_prepare()` succeeds
> - Add corresponding `pm_restore_gfp_mask()` calls in error paths and
> resume paths
> - Remove the now-redundant calls from hibernate.c and suspend.c
Reworking how different layers of the kernel interact is not minimal,
and it not self contained.
> 4. **Low Risk of Regression**: The change maintains the original intent
> of preventing I/O during the critical suspend phase while allowing it
> during device preparation. The swap restriction still happens before
> `dpm_suspend()`, just after `dpm_prepare()`.
There is no analysis anywhere on what happens to the code with
code that might expect the old behavior.
So it is not possible to conclude a low risk of regression,
in fact we can't conclude anything.
> ## Follows Stable Rules
>
> 5. **Meets Stable Criteria**:
> - Fixes a real bug that bothers people (suspend failures)
Addresses a real bug, yes. Fixes?
> - Small change (moves function calls, doesn't introduce new logic)
No.
> - Obviously correct (allows drivers to use swap during their
> designated preparation phase)
Not at all. It certainly isn't obvious to me what is going on.
> - Already tested by users (Tested-by tags from affected users)
Yes there are Tested-by tags.
> ## Similar to Other Backported Commits
>
> 6. **Pattern Matches**: Looking at the similar commits provided, this
> follows the same pattern as the AMD GPU eviction commits that were
> backported. Those commits also addressed the same fundamental issue -
> ensuring GPU VRAM can be properly evicted during suspend/hibernation.
Which other commits are those?
> ## Critical Timing
Timing?
> 7. **Error Path Handling**: The commit properly handles error paths by
> adding `pm_restore_gfp_mask()` calls in:
> - `dpm_resume_end()` for normal resume
> - `platform_recover()` error path in suspend.c
> - `pm_restore_gfp_mask()` in kexec_core.c for kexec flows
I don't see anything in this change that has to do with error paths.
> The commit is well-tested, addresses a real problem affecting users, and
> makes a minimal, obviously correct change to fix suspend failures on
> systems with discrete GPUs under memory pressure.
The evidence that a 3 week old change is well tested, simply
because it has been merged into Linus's change seems lacking.
Tested yes, but is it well tested? Are there any possible side
effects?
I certainly see no evidence of any testing or any exercise at
all of the kexec path modified. I wasn't even away of this
change until this backport came in.
Eric
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH AUTOSEL 6.15 6/8] PM: Restrict swap use to later in the suspend sequence
2025-07-08 19:32 ` Eric W. Biederman
@ 2025-07-08 20:32 ` Sasha Levin
2025-07-08 20:37 ` Pavel Machek
` (2 more replies)
2025-07-08 20:38 ` Pavel Machek
1 sibling, 3 replies; 22+ messages in thread
From: Sasha Levin @ 2025-07-08 20:32 UTC (permalink / raw)
To: Eric W. Biederman
Cc: patches, stable, Mario Limonciello, Nat Wittstock, Lucian Langa,
Rafael J . Wysocki, rafael, pavel, len.brown, linux-pm, kexec
On Tue, Jul 08, 2025 at 02:32:02PM -0500, Eric W. Biederman wrote:
>
>Wow!
>
>Sasha I think an impersonator has gotten into your account, and
>is just making nonsense up.
https://lore.kernel.org/all/aDXQaq-bq5BMMlce@lappy/
>At best all of this appears to be an effort to get someone else to
>do necessary thinking for you. As my time for kernel work is very
>limited I expect I will auto-nack any such future attempts to outsource
>someone else's thinking on me.
I've gone ahead and added you to the list of people who AUTOSEL will
skip, so no need to worry about wasting your time here.
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH AUTOSEL 6.15 6/8] PM: Restrict swap use to later in the suspend sequence
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:41 ` Pavel Machek
2025-07-08 21:46 ` Eric W. Biederman
2 siblings, 1 reply; 22+ messages in thread
From: Pavel Machek @ 2025-07-08 20:37 UTC (permalink / raw)
To: Sasha Levin
Cc: Eric W. Biederman, patches, stable, Mario Limonciello,
Nat Wittstock, Lucian Langa, Rafael J . Wysocki, rafael,
len.brown, linux-pm, kexec
[-- Attachment #1: Type: text/plain, Size: 990 bytes --]
On Tue 2025-07-08 16:32:49, Sasha Levin wrote:
> On Tue, Jul 08, 2025 at 02:32:02PM -0500, Eric W. Biederman wrote:
> >
> > Wow!
> >
> > Sasha I think an impersonator has gotten into your account, and
> > is just making nonsense up.
>
> https://lore.kernel.org/all/aDXQaq-bq5BMMlce@lappy/
>
> > At best all of this appears to be an effort to get someone else to
> > do necessary thinking for you. As my time for kernel work is very
> > limited I expect I will auto-nack any such future attempts to outsource
> > someone else's thinking on me.
>
> I've gone ahead and added you to the list of people who AUTOSEL will
> skip, so no need to worry about wasting your time here.
Can you read?
Your stupid robot is sending junk to the list. And you simply
blacklist people who complain? Resulting in more junk in autosel?
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 --]
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH AUTOSEL 6.15 6/8] PM: Restrict swap use to later in the suspend sequence
2025-07-08 19:32 ` Eric W. Biederman
2025-07-08 20:32 ` Sasha Levin
@ 2025-07-08 20:38 ` Pavel Machek
1 sibling, 0 replies; 22+ messages in thread
From: Pavel Machek @ 2025-07-08 20:38 UTC (permalink / raw)
To: Eric W. Biederman
Cc: Sasha Levin, patches, stable, Mario Limonciello, Nat Wittstock,
Lucian Langa, Rafael J . Wysocki, rafael, len.brown, linux-pm,
kexec
[-- Attachment #1: Type: text/plain, Size: 1061 bytes --]
Hi!
>
> Sasha I think an impersonator has gotten into your account, and
> is just making nonsense up.
>
> At first glance this reads like an impassioned plea to backport this
> change, from someone who has actually dealt with it.
>
> Unfortunately reading the justification in detail is an exercise
> in reading falsehoods.
>
> If this does not come from an impersonator then:
> - If this comes from a human being, I recommend you have a talk with
> them.
> - If this comes from a machine I recommend you take it out of commission
> and rework it.
>
> At best all of this appears to be an effort to get someone else to
> do necessary thinking for you. As my time for kernel work is very
> limited I expect I will auto-nack any such future attempts to outsource
> someone else's thinking on me.
I'm glad I'm not the only one who finds "lets use LLM to try to waste
other people's time" insulting :-(.
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 --]
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH AUTOSEL 6.15 6/8] PM: Restrict swap use to later in the suspend sequence
2025-07-08 20:32 ` Sasha Levin
2025-07-08 20:37 ` Pavel Machek
@ 2025-07-08 20:41 ` Pavel Machek
2025-07-08 21:46 ` Eric W. Biederman
2 siblings, 0 replies; 22+ messages in thread
From: Pavel Machek @ 2025-07-08 20:41 UTC (permalink / raw)
To: Sasha Levin
Cc: Eric W. Biederman, patches, stable, Mario Limonciello,
Nat Wittstock, Lucian Langa, Rafael J . Wysocki, rafael,
len.brown, linux-pm, kexec
[-- Attachment #1: Type: text/plain, Size: 1057 bytes --]
On Tue 2025-07-08 16:32:49, Sasha Levin wrote:
> On Tue, Jul 08, 2025 at 02:32:02PM -0500, Eric W. Biederman wrote:
> >
> > Wow!
> >
> > Sasha I think an impersonator has gotten into your account, and
> > is just making nonsense up.
>
> https://lore.kernel.org/all/aDXQaq-bq5BMMlce@lappy/
>
> > At best all of this appears to be an effort to get someone else to
> > do necessary thinking for you. As my time for kernel work is very
> > limited I expect I will auto-nack any such future attempts to outsource
> > someone else's thinking on me.
>
> I've gone ahead and added you to the list of people who AUTOSEL will
> skip, so no need to worry about wasting your time here.
Do you have half a brain, or is it LLM talking again?
You are sending autogenerated junk and signing it with your
name. That's not okay. You are putting Signed-off on patches you have
not checked. That's not okay, either.
Stop it.
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 --]
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH AUTOSEL 6.15 6/8] PM: Restrict swap use to later in the suspend sequence
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
0 siblings, 2 replies; 22+ messages in thread
From: Willy Tarreau @ 2025-07-08 20:46 UTC (permalink / raw)
To: Pavel Machek
Cc: Sasha Levin, Eric W. Biederman, patches, stable,
Mario Limonciello, Nat Wittstock, Lucian Langa,
Rafael J . Wysocki, rafael, len.brown, linux-pm, kexec
On Tue, Jul 08, 2025 at 10:37:33PM +0200, Pavel Machek wrote:
> On Tue 2025-07-08 16:32:49, Sasha Levin wrote:
> > I've gone ahead and added you to the list of people who AUTOSEL will
> > skip, so no need to worry about wasting your time here.
>
> Can you read?
>
> Your stupid robot is sending junk to the list. And you simply
> blacklist people who complain? Resulting in more junk in autosel?
No, he said autosel will now skip patches from you, not ignore your
complaint. So eventually only those who are fine with autosel's job
will have their patches selected and the other ones not. This will
result in less patches there.
Willy
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH AUTOSEL 6.15 6/8] PM: Restrict swap use to later in the suspend sequence
2025-07-08 20:46 ` Willy Tarreau
@ 2025-07-08 20:49 ` Pavel Machek
2025-07-08 21:12 ` Sasha Levin
1 sibling, 0 replies; 22+ messages in thread
From: Pavel Machek @ 2025-07-08 20:49 UTC (permalink / raw)
To: Willy Tarreau
Cc: Sasha Levin, Eric W. Biederman, patches, stable,
Mario Limonciello, Nat Wittstock, Lucian Langa,
Rafael J . Wysocki, rafael, len.brown, linux-pm, kexec
[-- Attachment #1: Type: text/plain, Size: 935 bytes --]
On Tue 2025-07-08 22:46:07, Willy Tarreau wrote:
> On Tue, Jul 08, 2025 at 10:37:33PM +0200, Pavel Machek wrote:
> > On Tue 2025-07-08 16:32:49, Sasha Levin wrote:
> > > I've gone ahead and added you to the list of people who AUTOSEL will
> > > skip, so no need to worry about wasting your time here.
> >
> > Can you read?
> >
> > Your stupid robot is sending junk to the list. And you simply
> > blacklist people who complain? Resulting in more junk in autosel?
>
> No, he said autosel will now skip patches from you, not ignore your
> complaint. So eventually only those who are fine with autosel's job
> will have their patches selected and the other ones not. This will
> result in less patches there.
That's not how I understand it. Patch was not from Eric, patch was
being reviewed by Eric.
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 --]
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH AUTOSEL 6.15 6/8] PM: Restrict swap use to later in the suspend sequence
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
1 sibling, 2 replies; 22+ messages in thread
From: Sasha Levin @ 2025-07-08 21:12 UTC (permalink / raw)
To: Willy Tarreau
Cc: Pavel Machek, Eric W. Biederman, patches, stable,
Mario Limonciello, Nat Wittstock, Lucian Langa,
Rafael J . Wysocki, rafael, len.brown, linux-pm, kexec
On Tue, Jul 08, 2025 at 10:46:07PM +0200, Willy Tarreau wrote:
>On Tue, Jul 08, 2025 at 10:37:33PM +0200, Pavel Machek wrote:
>> On Tue 2025-07-08 16:32:49, Sasha Levin wrote:
>> > I've gone ahead and added you to the list of people who AUTOSEL will
>> > skip, so no need to worry about wasting your time here.
>>
>> Can you read?
>>
>> Your stupid robot is sending junk to the list. And you simply
>> blacklist people who complain? Resulting in more junk in autosel?
>
>No, he said autosel will now skip patches from you, not ignore your
>complaint. So eventually only those who are fine with autosel's job
>will have their patches selected and the other ones not. This will
>result in less patches there.
The only one on my blacklist here is Pavel.
We have a list of folks who have requested that either their own or the
subsystem they maintain would not be reviewed by AUTOSEL. I've added Eric's name
to that list as he has indicated he's not interested in receiving these
patches. It's not a blacklist (nor did I use the word blacklist).
https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/tree/ignore_list
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH AUTOSEL 6.15 6/8] PM: Restrict swap use to later in the suspend sequence
2025-07-08 21:12 ` Sasha Levin
@ 2025-07-08 21:26 ` Pavel Machek
2025-07-09 5:34 ` Pavel Machek
1 sibling, 0 replies; 22+ messages in thread
From: Pavel Machek @ 2025-07-08 21:26 UTC (permalink / raw)
To: Sasha Levin
Cc: Willy Tarreau, Eric W. Biederman, patches, stable,
Mario Limonciello, Nat Wittstock, Lucian Langa,
Rafael J . Wysocki, rafael, len.brown, linux-pm, kexec
[-- Attachment #1: Type: text/plain, Size: 1710 bytes --]
On Tue 2025-07-08 17:12:46, Sasha Levin wrote:
> On Tue, Jul 08, 2025 at 10:46:07PM +0200, Willy Tarreau wrote:
> > On Tue, Jul 08, 2025 at 10:37:33PM +0200, Pavel Machek wrote:
> > > On Tue 2025-07-08 16:32:49, Sasha Levin wrote:
> > > > I've gone ahead and added you to the list of people who AUTOSEL will
> > > > skip, so no need to worry about wasting your time here.
> > >
> > > Can you read?
> > >
> > > Your stupid robot is sending junk to the list. And you simply
> > > blacklist people who complain? Resulting in more junk in autosel?
> >
> > No, he said autosel will now skip patches from you, not ignore your
> > complaint. So eventually only those who are fine with autosel's job
> > will have their patches selected and the other ones not. This will
> > result in less patches there.
>
> The only one on my blacklist here is Pavel.
>
> We have a list of folks who have requested that either their own or the
> subsystem they maintain would not be reviewed by AUTOSEL. I've added Eric's name
> to that list as he has indicated he's not interested in receiving these
> patches. It's not a blacklist (nor did I use the word blacklist).
Can you please clearly separate emails you wrote, from emails some
kind of LLM generate? Word "bot" in the From: would be enough.
Also, can you please clearly mark patches you checked, by
Signed-off-by: and distinguish them from patches only some kind of
halucinating autocomplete checked, perhaps, again, by the word "bot"
in the Signed-off-by: line?
Thank you.
Hopefully I'm taking to human this time.
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 --]
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH AUTOSEL 6.15 6/8] PM: Restrict swap use to later in the suspend sequence
2025-07-08 20:32 ` Sasha Levin
2025-07-08 20:37 ` Pavel Machek
2025-07-08 20:41 ` Pavel Machek
@ 2025-07-08 21:46 ` Eric W. Biederman
2025-07-08 22:26 ` Sasha Levin
2 siblings, 1 reply; 22+ messages in thread
From: Eric W. Biederman @ 2025-07-08 21:46 UTC (permalink / raw)
To: Sasha Levin
Cc: patches, stable, Mario Limonciello, Nat Wittstock, Lucian Langa,
Rafael J . Wysocki, rafael, pavel, len.brown, linux-pm, kexec
Sasha Levin <sashal@kernel.org> writes:
> On Tue, Jul 08, 2025 at 02:32:02PM -0500, Eric W. Biederman wrote:
>>
>>Wow!
>>
>>Sasha I think an impersonator has gotten into your account, and
>>is just making nonsense up.
>
> https://lore.kernel.org/all/aDXQaq-bq5BMMlce@lappy/
It is nice it is giving explanations for it's backporting decisions.
It would be nicer if those explanations were clearly marked as
coming from a non-human agent, and did not read like a human being
impatient for a patch to be backported.
Further the machine given explanations were clearly wrong. Do you have
plans to do anything about that? Using very incorrect justifications
for backporting patches is scary.
I still highly recommend that you get your tool to not randomly
cut out bits from links it references, making them unfollowable.
>>At best all of this appears to be an effort to get someone else to
>>do necessary thinking for you. As my time for kernel work is very
>>limited I expect I will auto-nack any such future attempts to outsource
>>someone else's thinking on me.
>
> I've gone ahead and added you to the list of people who AUTOSEL will
> skip, so no need to worry about wasting your time here.
Thank you for that.
I assume going forward that AUTOSEL will not consider any patches
involving the core kernel and the user/kernel ABI going forward. The
areas I have been involved with over the years, and for which my review
might be interesting.
Eric
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH AUTOSEL 6.15 6/8] PM: Restrict swap use to later in the suspend sequence
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 16:23 ` Eric W. Biederman
0 siblings, 2 replies; 22+ messages in thread
From: Sasha Levin @ 2025-07-08 22:26 UTC (permalink / raw)
To: Eric W. Biederman
Cc: patches, stable, Mario Limonciello, Nat Wittstock, Lucian Langa,
Rafael J . Wysocki, rafael, pavel, len.brown, linux-pm, kexec
On Tue, Jul 08, 2025 at 04:46:19PM -0500, Eric W. Biederman wrote:
>Sasha Levin <sashal@kernel.org> writes:
>
>> On Tue, Jul 08, 2025 at 02:32:02PM -0500, Eric W. Biederman wrote:
>>>
>>>Wow!
>>>
>>>Sasha I think an impersonator has gotten into your account, and
>>>is just making nonsense up.
>>
>> https://lore.kernel.org/all/aDXQaq-bq5BMMlce@lappy/
>
>It is nice it is giving explanations for it's backporting decisions.
>
>It would be nicer if those explanations were clearly marked as
>coming from a non-human agent, and did not read like a human being
>impatient for a patch to be backported.
Thats a fair point. I'll add "LLM Analysis:" before the explanation to
future patches.
>Further the machine given explanations were clearly wrong. Do you have
>plans to do anything about that? Using very incorrect justifications
>for backporting patches is scary.
Just like in the past 8 years where AUTOSEL ran without any explanation
whatsoever, the patches are manually reviewed and tested prior to being
included in the stable tree.
I don't make a point to go back and correct the justification, it's
there more to give some idea as to why this patch was marked for
review and may be completely bogus (in which case I'll drop the patch).
For that matter, I'd often look at the explanation only if I don't fully
understand why a certain patch was selected. Most often I just use it as
a "Yes/No" signal.
In this instance I honestly haven't read the LLM explanation. I agree
with you that the explanation is flawed, but the patch clearly fixes a
problem:
"On AMD dGPUs this can lead to failed suspends under memory
pressure situations as all VRAM must be evicted to system memory
or swap."
So it was included in the AUTOSEL patchset.
Do you have an objection to this patch being included in -stable? So far
your concerns were about the LLM explanation rather than actual patch.
>I still highly recommend that you get your tool to not randomly
>cut out bits from links it references, making them unfollowable.
Good point. I'm not really sure what messes up the line wraps. I'll take
a look.
>>>At best all of this appears to be an effort to get someone else to
>>>do necessary thinking for you. As my time for kernel work is very
>>>limited I expect I will auto-nack any such future attempts to outsource
>>>someone else's thinking on me.
>>
>> I've gone ahead and added you to the list of people who AUTOSEL will
>> skip, so no need to worry about wasting your time here.
>
>Thank you for that.
>
>I assume going forward that AUTOSEL will not consider any patches
>involving the core kernel and the user/kernel ABI going forward. The
>areas I have been involved with over the years, and for which my review
>might be interesting.
The filter is based on authorship and SoBs. Individual maintainers of a
subsystem can elect to have their entire subsystem added to the ignore
list.
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH AUTOSEL 6.15 6/8] PM: Restrict swap use to later in the suspend sequence
2025-07-08 21:12 ` Sasha Levin
2025-07-08 21:26 ` Pavel Machek
@ 2025-07-09 5:34 ` Pavel Machek
1 sibling, 0 replies; 22+ messages in thread
From: Pavel Machek @ 2025-07-09 5:34 UTC (permalink / raw)
To: Sasha Levin
Cc: Willy Tarreau, Eric W. Biederman, patches, stable,
Mario Limonciello, Nat Wittstock, Lucian Langa,
Rafael J . Wysocki, rafael, len.brown, linux-pm, kexec
[-- Attachment #1: Type: text/plain, Size: 1002 bytes --]
On Tue 2025-07-08 17:12:46, Sasha Levin wrote:
> On Tue, Jul 08, 2025 at 10:46:07PM +0200, Willy Tarreau wrote:
> > On Tue, Jul 08, 2025 at 10:37:33PM +0200, Pavel Machek wrote:
> > > On Tue 2025-07-08 16:32:49, Sasha Levin wrote:
> > > > I've gone ahead and added you to the list of people who AUTOSEL will
> > > > skip, so no need to worry about wasting your time here.
> > >
> > > Can you read?
> > >
> > > Your stupid robot is sending junk to the list. And you simply
> > > blacklist people who complain? Resulting in more junk in autosel?
> >
> > No, he said autosel will now skip patches from you, not ignore your
> > complaint. So eventually only those who are fine with autosel's job
> > will have their patches selected and the other ones not. This will
> > result in less patches there.
>
> The only one on my blacklist here is Pavel.
Please explain.
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 --]
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH AUTOSEL 6.15 6/8] PM: Restrict swap use to later in the suspend sequence
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
1 sibling, 1 reply; 22+ messages in thread
From: Pavel Machek @ 2025-07-09 5:39 UTC (permalink / raw)
To: Sasha Levin
Cc: Eric W. Biederman, patches, stable, Mario Limonciello,
Nat Wittstock, Lucian Langa, Rafael J . Wysocki, rafael,
len.brown, linux-pm, kexec
[-- Attachment #1: Type: text/plain, Size: 1070 bytes --]
> In this instance I honestly haven't read the LLM explanation. I agree
> with you that the explanation is flawed, but the patch clearly fixes a
> problem:
>
> "On AMD dGPUs this can lead to failed suspends under memory
> pressure situations as all VRAM must be evicted to system memory
> or swap."
>
> So it was included in the AUTOSEL patchset.
Is "may fix a problem" the only criteria for -stable inclusion? You
have been acting as if so. Please update the rules, if so.
> > I assume going forward that AUTOSEL will not consider any patches
> > involving the core kernel and the user/kernel ABI going forward. The
> > areas I have been involved with over the years, and for which my review
> > might be interesting.
>
> The filter is based on authorship and SoBs. Individual maintainers of a
> subsystem can elect to have their entire subsystem added to the ignore
> list.
Then the filter is misdesigned.
BR,
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 --]
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH AUTOSEL 6.15 6/8] PM: Restrict swap use to later in the suspend sequence
2025-07-09 5:39 ` Pavel Machek
@ 2025-07-09 14:35 ` Mario Limonciello
0 siblings, 0 replies; 22+ messages in thread
From: Mario Limonciello @ 2025-07-09 14:35 UTC (permalink / raw)
To: Pavel Machek, Sasha Levin
Cc: Eric W. Biederman, patches, stable, Nat Wittstock, Lucian Langa,
Rafael J . Wysocki, rafael, len.brown, linux-pm, kexec
On 7/9/2025 1:39 AM, Pavel Machek wrote:
>
>> In this instance I honestly haven't read the LLM explanation. I agree
>> with you that the explanation is flawed, but the patch clearly fixes a
>> problem:
>>
>> "On AMD dGPUs this can lead to failed suspends under memory
>> pressure situations as all VRAM must be evicted to system memory
>> or swap."
>>
>> So it was included in the AUTOSEL patchset.
>
> Is "may fix a problem" the only criteria for -stable inclusion? You
> have been acting as if so. Please update the rules, if so.
I would say that it most definitely does fix a problem. There are
multiple testers who have confirmed it.
But as it's rightfully pointed out the environment that drivers have
during the initial pmops callbacks is different (swap is still available).
I don't expect regressions from this; but wider testing is the only way
that we will find out. Either we find out in 6.15.y or we find out in
6.16.y. Either way if there are regressions we either revert or fix them.
>
>>> I assume going forward that AUTOSEL will not consider any patches
>>> involving the core kernel and the user/kernel ABI going forward. The
>>> areas I have been involved with over the years, and for which my review
>>> might be interesting.
>>
>> The filter is based on authorship and SoBs. Individual maintainers of a
>> subsystem can elect to have their entire subsystem added to the ignore
>> list.
>
> Then the filter is misdesigned.
>
> BR,
> Pavel
>
>
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH AUTOSEL 6.15 6/8] PM: Restrict swap use to later in the suspend sequence
2025-07-08 22:26 ` Sasha Levin
2025-07-09 5:39 ` Pavel Machek
@ 2025-07-09 16:23 ` Eric W. Biederman
2025-07-09 16:35 ` Mario Limonciello
2025-07-09 17:37 ` Sasha Levin
1 sibling, 2 replies; 22+ messages in thread
From: Eric W. Biederman @ 2025-07-09 16:23 UTC (permalink / raw)
To: Sasha Levin
Cc: patches, stable, Mario Limonciello, Nat Wittstock, Lucian Langa,
Rafael J . Wysocki, rafael, pavel, len.brown, linux-pm, kexec
Sasha Levin <sashal@kernel.org> writes:
> On Tue, Jul 08, 2025 at 04:46:19PM -0500, Eric W. Biederman wrote:
>>Sasha Levin <sashal@kernel.org> writes:
>>
>>> On Tue, Jul 08, 2025 at 02:32:02PM -0500, Eric W. Biederman wrote:
>>>>
>>>>Wow!
>>>>
>>>>Sasha I think an impersonator has gotten into your account, and
>>>>is just making nonsense up.
>>>
>>> https://lore.kernel.org/all/aDXQaq-bq5BMMlce@lappy/
>>
>>It is nice it is giving explanations for it's backporting decisions.
>>
>>It would be nicer if those explanations were clearly marked as
>>coming from a non-human agent, and did not read like a human being
>>impatient for a patch to be backported.
>
> Thats a fair point. I'll add "LLM Analysis:" before the explanation to
> future patches.
>
>>Further the machine given explanations were clearly wrong. Do you have
>>plans to do anything about that? Using very incorrect justifications
>>for backporting patches is scary.
>
> Just like in the past 8 years where AUTOSEL ran without any explanation
> whatsoever, the patches are manually reviewed and tested prior to being
> included in the stable tree.
I believe there is some testing done. However for a lot of what I see
go by I would be strongly surprised if there is actually much manual
review.
I expect there is a lot of the changes are simply ignored after a quick
glance because people don't know what is going on, or they are of too
little consequence to spend time on.
> I don't make a point to go back and correct the justification, it's
> there more to give some idea as to why this patch was marked for
> review and may be completely bogus (in which case I'll drop the patch).
>
> For that matter, I'd often look at the explanation only if I don't fully
> understand why a certain patch was selected. Most often I just use it as
> a "Yes/No" signal.
>
> In this instance I honestly haven't read the LLM explanation. I agree
> with you that the explanation is flawed, but the patch clearly fixes a
> problem:
>
> "On AMD dGPUs this can lead to failed suspends under memory
> pressure situations as all VRAM must be evicted to system memory
> or swap."
>
> So it was included in the AUTOSEL patchset.
> Do you have an objection to this patch being included in -stable? So far
> your concerns were about the LLM explanation rather than actual patch.
Several objections.
- The explanation was clearly bogus.
- The maintainer takes alarm.
- The patch while small, is not simple and not obviously correct.
- The patch has not been thoroughly tested.
I object because the code does not appear to have been well tested
outside of the realm of fixing the issue.
There is no indication that the kexec code path has ever been exercised.
So this appears to be one of those changes that was merged under
the banner of "Let's see if this causes a regression".
To the original authors. I would have appreciated it being a little
more clearly called out in the change description that this came in
under "Let's see if this causes a regression".
Such changes should not be backported automatically. They should be
backported with care after the have seen much more usage/testing of
the kernel they were merged into. Probably after a kernel release or
so. This is something that can take some actual judgment to decide,
when a backport is reasonable.
>>I still highly recommend that you get your tool to not randomly
>>cut out bits from links it references, making them unfollowable.
>
> Good point. I'm not really sure what messes up the line wraps. I'll take
> a look.
It was a bit more than line wraps. At first glance I thought
it was just removing a prefix from the links. On second glance
it appears it is completely making a hash of links:
The links in question:
https://github.com/ROCm/ROCK-Kernel-Driver/issues/174
https://gitlab.freedesktop.org/drm/amd/-/issues/2362
The unusable restatement of those links:
ROCm/ROCK-Kernel-Driver#174
freedesktop.org/drm/amd#2362
Short of knowing to look up into the patch to find the links,
those references are completely junk.
>>>>At best all of this appears to be an effort to get someone else to
>>>>do necessary thinking for you. As my time for kernel work is very
>>>>limited I expect I will auto-nack any such future attempts to outsource
>>>>someone else's thinking on me.
>>>
>>> I've gone ahead and added you to the list of people who AUTOSEL will
>>> skip, so no need to worry about wasting your time here.
>>
>>Thank you for that.
>>
>>I assume going forward that AUTOSEL will not consider any patches
>>involving the core kernel and the user/kernel ABI going forward. The
>>areas I have been involved with over the years, and for which my review
>>might be interesting.
>
> The filter is based on authorship and SoBs. Individual maintainers of a
> subsystem can elect to have their entire subsystem added to the ignore
> list.
As I said. I expect that the process looking at the output of
get_maintainers.pl and ignoring a change when my name is returned
will result in effectively the entire core kernel and the user/kernel
ABI not being eligible for backport.
I bring this up because I was not an author and I did not have any
signed-off-by's on the change in question, and yet I was still selected
for the review.
Eric
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH AUTOSEL 6.15 6/8] PM: Restrict swap use to later in the suspend sequence
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
1 sibling, 1 reply; 22+ messages in thread
From: Mario Limonciello @ 2025-07-09 16:35 UTC (permalink / raw)
To: Eric W. Biederman, Sasha Levin
Cc: patches, stable, Nat Wittstock, Lucian Langa, Rafael J . Wysocki,
rafael, pavel, len.brown, linux-pm, kexec
On 7/9/2025 12:23 PM, Eric W. Biederman wrote:
> Sasha Levin <sashal@kernel.org> writes:
>
>> On Tue, Jul 08, 2025 at 04:46:19PM -0500, Eric W. Biederman wrote:
>>> Sasha Levin <sashal@kernel.org> writes:
>>>
>>>> On Tue, Jul 08, 2025 at 02:32:02PM -0500, Eric W. Biederman wrote:
>>>>>
>>>>> Wow!
>>>>>
>>>>> Sasha I think an impersonator has gotten into your account, and
>>>>> is just making nonsense up.
>>>>
>>>> https://lore.kernel.org/all/aDXQaq-bq5BMMlce@lappy/
>>>
>>> It is nice it is giving explanations for it's backporting decisions.
>>>
>>> It would be nicer if those explanations were clearly marked as
>>> coming from a non-human agent, and did not read like a human being
>>> impatient for a patch to be backported.
>>
>> Thats a fair point. I'll add "LLM Analysis:" before the explanation to
>> future patches.
>>
>>> Further the machine given explanations were clearly wrong. Do you have
>>> plans to do anything about that? Using very incorrect justifications
>>> for backporting patches is scary.
>>
>> Just like in the past 8 years where AUTOSEL ran without any explanation
>> whatsoever, the patches are manually reviewed and tested prior to being
>> included in the stable tree.
>
> I believe there is some testing done. However for a lot of what I see
> go by I would be strongly surprised if there is actually much manual
> review.
>
> I expect there is a lot of the changes are simply ignored after a quick
> glance because people don't know what is going on, or they are of too
> little consequence to spend time on.
>
>> I don't make a point to go back and correct the justification, it's
>> there more to give some idea as to why this patch was marked for
>> review and may be completely bogus (in which case I'll drop the patch).
>>
>> For that matter, I'd often look at the explanation only if I don't fully
>> understand why a certain patch was selected. Most often I just use it as
>> a "Yes/No" signal.
>>
>> In this instance I honestly haven't read the LLM explanation. I agree
>> with you that the explanation is flawed, but the patch clearly fixes a
>> problem:
>>
>> "On AMD dGPUs this can lead to failed suspends under memory
>> pressure situations as all VRAM must be evicted to system memory
>> or swap."
>>
>> So it was included in the AUTOSEL patchset.
>
>
>> Do you have an objection to this patch being included in -stable? So far
>> your concerns were about the LLM explanation rather than actual patch.
>
> Several objections.
> - The explanation was clearly bogus.
> - The maintainer takes alarm.
> - The patch while small, is not simple and not obviously correct.
> - The patch has not been thoroughly tested.
>
> I object because the code does not appear to have been well tested
> outside of the realm of fixing the issue.
>
> There is no indication that the kexec code path has ever been exercised.
>
> So this appears to be one of those changes that was merged under
> the banner of "Let's see if this causes a regression".>
> To the original authors. I would have appreciated it being a little
> more clearly called out in the change description that this came in
> under "Let's see if this causes a regression".
>
As the original author of this patch I don't feel this patch is any
different than any other patch in that regard.
I don't write in a commit message the expected risk of a patch.
There are always people that find interesting ways to exercise it and
they could find problems that I didn't envision.
> Such changes should not be backported automatically. They should be
> backported with care after the have seen much more usage/testing of
> the kernel they were merged into. Probably after a kernel release or
> so. This is something that can take some actual judgment to decide,
> when a backport is reasonable.
TBH - I didn't include stable in the commit message with the intent that
after this baked a cycle or so that we could bring it back later if
AUTOSEL hadn't picked it up by then.
It's a real issue people have complained about for years that is
non-obvious where the root cause is.
Once we're all confident on this I'd love to discuss bringing it back
even further to LTS kernels if it's viable.
>
>>> I still highly recommend that you get your tool to not randomly
>>> cut out bits from links it references, making them unfollowable.
>>
>> Good point. I'm not really sure what messes up the line wraps. I'll take
>> a look.
>
> It was a bit more than line wraps. At first glance I thought
> it was just removing a prefix from the links. On second glance
> it appears it is completely making a hash of links:
>
> The links in question:
> https://github.com/ROCm/ROCK-Kernel-Driver/issues/174
> https://gitlab.freedesktop.org/drm/amd/-/issues/2362
>
> The unusable restatement of those links:
> ROCm/ROCK-Kernel-Driver#174
> freedesktop.org/drm/amd#2362
>
> Short of knowing to look up into the patch to find the links,
> those references are completely junk.
>
>>>>> At best all of this appears to be an effort to get someone else to
>>>>> do necessary thinking for you. As my time for kernel work is very
>>>>> limited I expect I will auto-nack any such future attempts to outsource
>>>>> someone else's thinking on me.
>>>>
>>>> I've gone ahead and added you to the list of people who AUTOSEL will
>>>> skip, so no need to worry about wasting your time here.
>>>
>>> Thank you for that.
>>>
>>> I assume going forward that AUTOSEL will not consider any patches
>>> involving the core kernel and the user/kernel ABI going forward. The
>>> areas I have been involved with over the years, and for which my review
>>> might be interesting.
>>
>> The filter is based on authorship and SoBs. Individual maintainers of a
>> subsystem can elect to have their entire subsystem added to the ignore
>> list.
>
> As I said. I expect that the process looking at the output of
> get_maintainers.pl and ignoring a change when my name is returned
> will result in effectively the entire core kernel and the user/kernel
> ABI not being eligible for backport.
>
> I bring this up because I was not an author and I did not have any
> signed-off-by's on the change in question, and yet I was still selected
> for the review.
>
> Eric
>
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH AUTOSEL 6.15 6/8] PM: Restrict swap use to later in the suspend sequence
2025-07-09 16:35 ` Mario Limonciello
@ 2025-07-09 16:55 ` Rafael J. Wysocki
0 siblings, 0 replies; 22+ messages in thread
From: Rafael J. Wysocki @ 2025-07-09 16:55 UTC (permalink / raw)
To: Mario Limonciello, Sasha Levin
Cc: Eric W. Biederman, patches, stable, Nat Wittstock, Lucian Langa,
Rafael J . Wysocki, rafael, pavel, len.brown, linux-pm, kexec
On Wed, Jul 9, 2025 at 6:35 PM Mario Limonciello
<mario.limonciello@amd.com> wrote:
>
> On 7/9/2025 12:23 PM, Eric W. Biederman wrote:
> > Sasha Levin <sashal@kernel.org> writes:
> >
> >> On Tue, Jul 08, 2025 at 04:46:19PM -0500, Eric W. Biederman wrote:
> >>> Sasha Levin <sashal@kernel.org> writes:
> >>>
> >>>> On Tue, Jul 08, 2025 at 02:32:02PM -0500, Eric W. Biederman wrote:
> >>>>>
> >>>>> Wow!
> >>>>>
> >>>>> Sasha I think an impersonator has gotten into your account, and
> >>>>> is just making nonsense up.
> >>>>
> >>>> https://lore.kernel.org/all/aDXQaq-bq5BMMlce@lappy/
> >>>
> >>> It is nice it is giving explanations for it's backporting decisions.
> >>>
> >>> It would be nicer if those explanations were clearly marked as
> >>> coming from a non-human agent, and did not read like a human being
> >>> impatient for a patch to be backported.
> >>
> >> Thats a fair point. I'll add "LLM Analysis:" before the explanation to
> >> future patches.
> >>
> >>> Further the machine given explanations were clearly wrong. Do you have
> >>> plans to do anything about that? Using very incorrect justifications
> >>> for backporting patches is scary.
> >>
> >> Just like in the past 8 years where AUTOSEL ran without any explanation
> >> whatsoever, the patches are manually reviewed and tested prior to being
> >> included in the stable tree.
> >
> > I believe there is some testing done. However for a lot of what I see
> > go by I would be strongly surprised if there is actually much manual
> > review.
> >
> > I expect there is a lot of the changes are simply ignored after a quick
> > glance because people don't know what is going on, or they are of too
> > little consequence to spend time on.
> >
> >> I don't make a point to go back and correct the justification, it's
> >> there more to give some idea as to why this patch was marked for
> >> review and may be completely bogus (in which case I'll drop the patch).
> >>
> >> For that matter, I'd often look at the explanation only if I don't fully
> >> understand why a certain patch was selected. Most often I just use it as
> >> a "Yes/No" signal.
> >>
> >> In this instance I honestly haven't read the LLM explanation. I agree
> >> with you that the explanation is flawed, but the patch clearly fixes a
> >> problem:
> >>
> >> "On AMD dGPUs this can lead to failed suspends under memory
> >> pressure situations as all VRAM must be evicted to system memory
> >> or swap."
> >>
> >> So it was included in the AUTOSEL patchset.
> >
> >
> >> Do you have an objection to this patch being included in -stable? So far
> >> your concerns were about the LLM explanation rather than actual patch.
> >
> > Several objections.
> > - The explanation was clearly bogus.
> > - The maintainer takes alarm.
> > - The patch while small, is not simple and not obviously correct.
> > - The patch has not been thoroughly tested.
> >
> > I object because the code does not appear to have been well tested
> > outside of the realm of fixing the issue.
> >
> > There is no indication that the kexec code path has ever been exercised.
> >
> > So this appears to be one of those changes that was merged under
> > the banner of "Let's see if this causes a regression".>
> > To the original authors. I would have appreciated it being a little
> > more clearly called out in the change description that this came in
> > under "Let's see if this causes a regression".
> >
>
> As the original author of this patch I don't feel this patch is any
> different than any other patch in that regard.
> I don't write in a commit message the expected risk of a patch.
>
> There are always people that find interesting ways to exercise it and
> they could find problems that I didn't envision.
>
> > Such changes should not be backported automatically. They should be
> > backported with care after the have seen much more usage/testing of
> > the kernel they were merged into. Probably after a kernel release or
> > so. This is something that can take some actual judgment to decide,
> > when a backport is reasonable.
>
> TBH - I didn't include stable in the commit message with the intent that
> after this baked a cycle or so that we could bring it back later if
> AUTOSEL hadn't picked it up by then.
I actually see an issue in this patch that I have overlooked
previously, so Sasha and "stable" folks - please drop this one.
Namely, the change in dpm_resume_end() is going too far.
> It's a real issue people have complained about for years that is
> non-obvious where the root cause is.
>
> Once we're all confident on this I'd love to discuss bringing it back
> even further to LTS kernels if it's viable.
Sure.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH AUTOSEL 6.15 6/8] PM: Restrict swap use to later in the suspend sequence
2025-07-09 16:23 ` Eric W. Biederman
2025-07-09 16:35 ` Mario Limonciello
@ 2025-07-09 17:37 ` Sasha Levin
1 sibling, 0 replies; 22+ messages in thread
From: Sasha Levin @ 2025-07-09 17:37 UTC (permalink / raw)
To: Eric W. Biederman
Cc: patches, stable, Mario Limonciello, Nat Wittstock, Lucian Langa,
Rafael J . Wysocki, rafael, pavel, len.brown, linux-pm, kexec
On Wed, Jul 09, 2025 at 11:23:36AM -0500, Eric W. Biederman wrote:
>There is no indication that the kexec code path has ever been exercised.
>
>So this appears to be one of those changes that was merged under
>the banner of "Let's see if this causes a regression".
>
>To the original authors. I would have appreciated it being a little
>more clearly called out in the change description that this came in
>under "Let's see if this causes a regression".
>
>Such changes should not be backported automatically. They should be
>backported with care after the have seen much more usage/testing of
>the kernel they were merged into. Probably after a kernel release or
>so. This is something that can take some actual judgment to decide,
>when a backport is reasonable.
I'm assuming that you also refer to stable tagged patches that get
"automatically" picked up, right?
We already have a way to do what you suggest: maintainers can choose
not to tag their patches for stable, and have both their subsystem
and/or individual contributions ignored by AUTOSEL. This way they can
send us commits at their convenience.
There is one subsystem that is mostly doing that (XFS).
The other ones are *choosing* not to do that.
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2025-07-09 17:37 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[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
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox