lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a8d8e88b-ef88-4432-9da1-cb292d74d146@suse.com>
Date: Wed, 4 Feb 2026 17:22:11 +0100
From: Jürgen Groß <jgross@...e.com>
To: Chris Paulson-Ellis <chris@...lson-ellis.org>,
 Thomas Gleixner <tglx@...nel.org>, Ingo Molnar <mingo@...hat.com>,
 Borislav Petkov <bp@...en8.de>, Dave Hansen <dave.hansen@...ux.intel.com>,
 x86@...nel.org, "H. Peter Anvin" <hpa@...or.com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86/mtrr: Expedite cache init if MTRRs change on resume

On 04.02.26 17:15, Chris Paulson-Ellis wrote:
> An Apple MacBook Pro mid-2015 almost always takes ~20s to resume from
> suspend, measured from lid open to display of the desktop lock screen.
> 
> This is due to the MTRRs being different between suspend and resume on 4
> out of the 8 CPUs, including the boot CPU. The CPUs execute very slowly
> until arch_thaw_secondary_cpus_end() calls cache_aps_init(), which
> restores the MTRR settings to their pre-suspend values.
> 
> To obtain a reasonable resume time, we need to minimise the time the
> CPUs execute with inconsistent MTRR settings.
> 
> We do this by detecting the unexpected restore of the MTRRs on the boot
> CPU in cache_bp_restore(), and use this to override the delay of cache
> initialisation in the cache_ap_online() CPU hotplug handler, and
> skip the delayed cache initialisation in cache_aps_init().
> 
> With this fix, the system in question resumes in ~3s.

Does it get even better with my still pending series [1] applied?

[1]: https://lore.kernel.org/lkml/20260130113625.599305-1-jgross@suse.com/


Juergen

Download attachment "OpenPGP_0xB0DE9DD628BF132F.asc" of type "application/pgp-keys" (3684 bytes)

Download attachment "OpenPGP_signature.asc" of type "application/pgp-signature" (496 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ