From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4F89717BA9 for ; Sun, 22 Dec 2024 11:11:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.92.199 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734865882; cv=none; b=cyJP5rd4vSYjxiJNvMT2V+wBajx8WpWDNwC/ZzEFRcHZ42zycAIIIN+nU0pUV6Sh63ivWdbP4orMT3iwLhkR2LkUIibqjHrXStlJE4PB0Sk8d0D9VWNw76w77wbolMSXJ1bSQo4JgAdhuz9Axl3JMCxuF/IyRRGOW5rei0va51g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734865882; c=relaxed/simple; bh=A3cogsJbeJIZ0q74qfCarDb9uBJ3YehZNB3ArK+Fkx8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=po9DIAQN0Cq4EUau58pAnRn/U/VuIB+Le8nlSfCusY0dTm9Fr3zJd0gYXP1fa04WinlasYQN8B8loVW2/f5zs5d4pljLZ17eLgyhPBk/dLDanwdbHdR6faDTLJ+UcELGBpmGnhySC4gSP6Ep3IgPrZw4yv2nG/2nFhnTPMERJAU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=b2/xITwE; arc=none smtp.client-ip=90.155.92.199 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="b2/xITwE" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=fXsmKteIdbH6QDI4nqtO6BFvZFB70ZQq8jwhFlpN54k=; b=b2/xITwEbvVV014n2PZBew3Br0 5GLo8OH4cm0xkbcoiGlZnemWWh3Tb9i8PCF549WPWK66wdWEt6OVJ2grWiO24LPVXY6HUvcF+A0cT 86WMSy8PnUCDdmPPtGf40xvTaxoNMxHaCL/zPsdTQ3E5D7zjz75btkr6rG2/CrYyYmVJKb2TPvLDH yE61/y1uTn6Lqzi52smPanLplOn2Lg/OwljyrQS47r24H3+YfzJElXaZ7/idCldjJ9WHOXZHnHnny qJfDhT2PUanqLWyDRBREVZLj74Yh4b2NkMEEteOu9NS7Hr7uYRAbz70bAYkKp2TvZeRiRAz5nJgrT SVYAbHag==; Received: from 77-249-17-89.cable.dynamic.v4.ziggo.nl ([77.249.17.89] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.98 #2 (Red Hat Linux)) id 1tPJrd-000000066gk-26IU; Sun, 22 Dec 2024 11:11:13 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 12C5F3003AF; Sun, 22 Dec 2024 12:11:13 +0100 (CET) Date: Sun, 22 Dec 2024 12:11:13 +0100 From: Peter Zijlstra To: Rik van Riel Cc: x86@kernel.org, linux-kernel@vger.kernel.org, kernel-team@meta.com, dave.hansen@linux.intel.com, luto@kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, akpm@linux-foundation.org Subject: Re: [RFC PATCH 00/10] AMD broadcast TLB invalidation Message-ID: <20241222111113.GT11133@noisy.programming.kicks-ass.net> References: <20241222040717.3096835-1-riel@surriel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20241222040717.3096835-1-riel@surriel.com> On Sat, Dec 21, 2024 at 11:06:32PM -0500, Rik van Riel wrote: > Add support for broadcast TLB invalidation using AMD's INVLPGB instruction. > > This allows the kernel to invalidate TLB entries on remote CPUs without > needing to send IPIs, without having to wait for remote CPUs to handle > those interrupts, and with less interruption to what was running on > those CPUs. You're going to be needing this somewhere at the start of this series. diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 9d7bd0ae48c4..e8743f8c9fd0 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -274,7 +274,7 @@ config X86 select HAVE_PCI select HAVE_PERF_REGS select HAVE_PERF_USER_STACK_DUMP - select MMU_GATHER_RCU_TABLE_FREE if PARAVIRT + select MMU_GATHER_RCU_TABLE_FREE select MMU_GATHER_MERGE_VMAS select HAVE_POSIX_CPU_TIMERS_TASK_WORK select HAVE_REGS_AND_STACK_ACCESS_API diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c index fec381533555..c037592c67ef 100644 --- a/arch/x86/kernel/paravirt.c +++ b/arch/x86/kernel/paravirt.c @@ -61,7 +61,7 @@ void __init native_pv_lock_init(void) static void native_tlb_remove_table(struct mmu_gather *tlb, void *table) { - tlb_remove_page(tlb, table); + tlb_remove_table(tlb, table); } struct static_key paravirt_steal_enabled;