From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 70BE6221543 for ; Wed, 21 Jan 2026 14:11:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769004673; cv=none; b=WmMeJqqoLRUgPEpY7fylJlbdO3Qq+KAUjHPNqX9LGjGPvlNUtiedQK+ejrCDQxA+Jwi73eFqOFqSsXEqoIajAxC2C+w+5VUfsiNz0HcN4pNLGv31s5vX7Z0HmXKq1hSolAdFbt3yZh193I7Ifxhx7zf9Smn3RGaj2cx2xn3yqzY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769004673; c=relaxed/simple; bh=AFfr2KcH/WG4SmpNru64qWAWXvSPt0byrF/uwp2a9Q0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=tqfIwGvG8msqxM7vy4z3L/8x1qOhtOO+HEipHs3V69CDqQLLoxtSpyzqnm8+d/H6JpjtdHgXOatRwvI44iY+26N0DIpGmeKnoZBrZgu7ZWWX2yYZKuMeQQFXzPsTThsmXYfNA5j2hXHJCFwL07/Whq7/boURQylGeKmGoFqptBU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=ktZmEOQ9; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=bqn+nWwC; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="ktZmEOQ9"; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="bqn+nWwC" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 5E24D5BD15; Wed, 21 Jan 2026 14:11:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1769004669; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=G8sdieYYkhKoNr/bmZqVM8BxpfjBnVTNimg9pdaMh6g=; b=ktZmEOQ98V/+0vM7TAk+LZI0g5d3GsrSV+rd033OpmSaaqyLJX5iTHGa7oH9AH0PuNm35+ O5epO1Rxtlpi56jos2Pz88h0HK5l5UUxCuSx1zehFde92nCaETCvReS8FikZNEiOsggRFw d7oCBzTeNL+kvMAQtM51vtt7cTvbJxo= Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.com header.s=susede1 header.b=bqn+nWwC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1769004668; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=G8sdieYYkhKoNr/bmZqVM8BxpfjBnVTNimg9pdaMh6g=; b=bqn+nWwC/qeFbCQfWZyCjlV+KNIaxSJXD56WKkkui6CEYD3JDtNZKVEfEYTTMW7nyzvtdd dPWTYfSq1BY6HqrSyJltz1HZR+Brzomr0jfrVGW99tL9Zs91fwqtxISjtbtU5jy86ZILpj 8ZDkl4e8/KvwQk75JuyGPeFyHKJDOnQ= Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 1B09B3EA63; Wed, 21 Jan 2026 14:11:08 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 8udXBXzecGmHWQAAD6G6ig (envelope-from ); Wed, 21 Jan 2026 14:11:08 +0000 From: Juergen Gross To: linux-kernel@vger.kernel.org, x86@kernel.org Cc: Juergen Gross , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" Subject: [PATCH 0/4] x86/mtrr: Allow MTRR updates on multiple CPUs in parallel Date: Wed, 21 Jan 2026 15:11:02 +0100 Message-ID: <20260121141106.755458-1-jgross@suse.com> X-Mailer: git-send-email 2.52.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; R_DKIM_ALLOW(-0.20)[suse.com:s=susede1]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.com:dkim,suse.com:mid,imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FUZZY_RATELIMITED(0.00)[rspamd.com]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; MIME_TRACE(0.00)[0:+]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_SEVEN(0.00)[8]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; TO_DN_SOME(0.00)[]; DKIM_TRACE(0.00)[suse.com:+] X-Spam-Flag: NO X-Spam-Score: -3.01 X-Rspamd-Queue-Id: 5E24D5BD15 X-Rspamd-Action: no action X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spam-Level: Today MTRR updates are serialized to not happen on multiple CPUs at the same time, as the related coding is using global variables. On huge machines with lots of CPUs this can result in problems, as such updates are happening through stop_machine(), which will call the MTRR update function with interrupts off on all CPUs at the same time. The interrupts will be switched on only after the last CPU has finished the MTRR update. As the update is required to run in uncached mode, it can take easily several milliseconds on each CPU, resulting in the whole process to need several seconds. This in turn can cause the watchdog to trigger and to recognize a hard system lockup. This series is changing the behavior by allowing the MTRR update to happen on all CPUs in parallel. Juergen Gross (4): x86/mtrr: Move cache_enable() and cache_disable() to mtrr/generic.c x86/mtrr: Introduce MTRR work state structure x86/mtrr: Add a prepare_set hook to mtrr_ops x86/mtrr: Drop cache_disable_lock arch/x86/include/asm/cacheinfo.h | 2 - arch/x86/include/asm/mtrr.h | 2 - arch/x86/kernel/cpu/cacheinfo.c | 80 +---------------- arch/x86/kernel/cpu/mtrr/generic.c | 137 ++++++++++++++++++++++++----- arch/x86/kernel/cpu/mtrr/mtrr.c | 3 + arch/x86/kernel/cpu/mtrr/mtrr.h | 2 + 6 files changed, 120 insertions(+), 106 deletions(-) -- 2.52.0