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 190C036C598 for ; Fri, 30 Jan 2026 11:36:29 +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=1769772991; cv=none; b=c5g4J/ZvtyvUlDmsAq38IODDaXQI/8FfekEoDlPQ25nT0N6gjVVdyS96y8/bkX6aVuTaqe0yl1gJrd9M0R5qlfNHdHVvtByfKl8P2y6xH5HZ9b6e6DWiMUOcTwv9UZPgq7EctwhkFkmuU1Ufq5wC9qvqbaFDoCYH2jldVvYdldE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769772991; c=relaxed/simple; bh=fGL5IAvgFzuvAyZJEwGximfvptRnoDwz0RAd2fbU5rs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Kcu94ncK61EKu98enPk6IPWyogHROLQ9LAwAY3P/eGQlXGbs2HCNvLZ8NzTsbMuCcY+48MpfeSuFNkxIbTW4Q8jOncS1tNQEWH84HMTT9hIXe5QnQAbteotV0JGYX7nMp+1YOEKJYqcd21974fta2Dvf4q38CRjQjU9ZEzyqQ9o= 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=B9jjTZkO; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=B9jjTZkO; 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="B9jjTZkO"; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="B9jjTZkO" Received: from imap1.dmz-prg2.suse.org (unknown [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 23AD95BCC1; Fri, 30 Jan 2026 11:36:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1769772988; 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=QEMa2skgnXqSBfJuh8R6kDZbgf1qVvt5NQPs77nnn2s=; b=B9jjTZkOpc0wpRMMb+ytikWzPUo18qkBkO4GhvTQ+z9nJSH30DyuNxZdiniyUp9YPNlfwM XLjHx34x5l6rdiBlh302P4mA6QJptGdrUEjZdtDGxwl+W50SABHKIvW3To2qZVynndXkOs Fz/i+yM/RH/zGnDdb+aHTCRSpKDAj4Y= Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1769772988; 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=QEMa2skgnXqSBfJuh8R6kDZbgf1qVvt5NQPs77nnn2s=; b=B9jjTZkOpc0wpRMMb+ytikWzPUo18qkBkO4GhvTQ+z9nJSH30DyuNxZdiniyUp9YPNlfwM XLjHx34x5l6rdiBlh302P4mA6QJptGdrUEjZdtDGxwl+W50SABHKIvW3To2qZVynndXkOs Fz/i+yM/RH/zGnDdb+aHTCRSpKDAj4Y= 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 D55C83EA61; Fri, 30 Jan 2026 11:36:27 +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 +3fRMruXfGlHHQAAD6G6ig (envelope-from ); Fri, 30 Jan 2026 11:36:27 +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 v2 0/4] x86/mtrr: Allow MTRR updates on multiple CPUs in parallel Date: Fri, 30 Jan 2026 12:36:21 +0100 Message-ID: <20260130113625.599305-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 [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-0.996]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.com:mid]; FUZZY_RATELIMITED(0.00)[rspamd.com]; RCPT_COUNT_SEVEN(0.00)[8]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; TO_DN_SOME(0.00)[]; RCVD_TLS_ALL(0.00)[] X-Spam-Flag: NO X-Spam-Score: -2.80 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. Changes in V2: - fix a function comment header in patch 2 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 | 139 ++++++++++++++++++++++++----- arch/x86/kernel/cpu/mtrr/mtrr.c | 3 + arch/x86/kernel/cpu/mtrr/mtrr.h | 2 + 6 files changed, 122 insertions(+), 106 deletions(-) -- 2.52.0