Hi!

> From: Mario Limonciello <[email protected]>
> 
> [ 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 <[email protected]>
> Tested-by: Nat Wittstock <[email protected]>
> Tested-by: Lucian Langa <[email protected]>
> Link: https://patch.msgid.link/[email protected]
> Signed-off-by: Rafael J. Wysocki <[email protected]>
> Signed-off-by: Sasha Levin <[email protected]>


> ## 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: signature.asc
Description: PGP signature

Reply via email to