Message ID | 20241223025751.3268975-7-riel@surriel.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 19781E77188 for <linux-mm@archiver.kernel.org>; Mon, 23 Dec 2024 03:05:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9CE666B008C; Sun, 22 Dec 2024 22:05:08 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 97E5B6B0093; Sun, 22 Dec 2024 22:05:08 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 845C06B0095; Sun, 22 Dec 2024 22:05:08 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 661606B008C for <linux-mm@kvack.org>; Sun, 22 Dec 2024 22:05:08 -0500 (EST) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id E60B9B050C for <linux-mm@kvack.org>; Mon, 23 Dec 2024 03:05:07 +0000 (UTC) X-FDA: 82924731834.02.7E813E1 Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) by imf15.hostedemail.com (Postfix) with ESMTP id D62D4A0007 for <linux-mm@kvack.org>; Mon, 23 Dec 2024 03:04:05 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf15.hostedemail.com: domain of riel@shelob.surriel.com designates 96.67.55.147 as permitted sender) smtp.mailfrom=riel@shelob.surriel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1734923071; a=rsa-sha256; cv=none; b=zo9++Sus4yz0ZcnDhfl5f9YwIqPUSgcpyj0gY7KIjS+nKyxLah2xZVmGOjMfKRTa/uF2vy m+ZPiUdYfdYuRKqoXrK+9FVexTBHfZbh5pgEzvb86jrj0EWA2JFAT6UsMqin5A+YKV1N/P FmVUv7gdVnXoUdpcYttuUvvltwL3LpQ= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf15.hostedemail.com: domain of riel@shelob.surriel.com designates 96.67.55.147 as permitted sender) smtp.mailfrom=riel@shelob.surriel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1734923071; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RvUG6h0MQaYHtg8Ef5p8DQpEw1lCdNoPeCNYGAwIr28=; b=UO9IukcXSettUp8y8/D74c0ccF3hpzib2Ag7J7UICZBEQF3HoeN5m4i8oWDG/YssachAfw wC3ruY2nHORIamxj/tchfx9ywwj/ybEqPUjGoINq/uB5YTOcrAPqzkkcD1jBQgVwheFAc6 vj39OT0qfNIqBRf/rD3pGjUQIL8H7pI= Received: from fangorn.home.surriel.com ([10.0.13.7]) by shelob.surriel.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.97.1) (envelope-from <riel@shelob.surriel.com>) id 1tPYdp-000000001Ih-1doo; Sun, 22 Dec 2024 21:57:57 -0500 From: Rik van Riel <riel@surriel.com> To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com, dave.hansen@linux.intel.com, luto@kernel.org, peterz@infradead.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, akpm@linux-foundation.org, linux-mm@kvack.org, Rik van Riel <riel@surriel.com> Subject: [PATCH 06/11] x86/tlb: use INVLPGB in flush_tlb_all Date: Sun, 22 Dec 2024 21:55:12 -0500 Message-ID: <20241223025751.3268975-7-riel@surriel.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241223025751.3268975-1-riel@surriel.com> References: <20241223025751.3268975-1-riel@surriel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Stat-Signature: tmxrsd71x57xhy6nqgr6fg7aa749qxog X-Rspam-User: X-Rspamd-Queue-Id: D62D4A0007 X-Rspamd-Server: rspam08 X-HE-Tag: 1734923045-716676 X-HE-Meta: U2FsdGVkX1+zqQ84hLyhzv568rT+KLOJvx1tddGk6ub8lq8bnGNVV/gtJUdNszYo6JP5BDQjgsi7RFIUEOcSHCSb/Q/m2Craq7BsZcIqKctefE6GcL5CA7rzLqpjlJ4ukoG0dat98ZkeBAW36/tW7BHKxAfzP6yMDQGJUH4VcP5Es9ogz+vSEGTA6cMj+X4gmo+iAtRK0sF6WVLpZ5W8JQanAJfLHHbTr0QqDJ/McMaxQ/8sCBnLPcAg8uFrFys5JWB8T1f0Vfh18BgZBJZZX5KEpOhnqaOX0z+dEkTLxNG3omD2lstfo15QCo4hYKXb0R+8dN7TjsHV5eSQu4AXdoThwQAKZnXUTs53REG50nAMRuFCpro1/qMOkuwB0IgJrEV3wuMPDk/bv0ERaJlk1uTUAUOZMIzv4NYvNcBHGaMaH7wFDCHZzep20o6BM0D5joB89LUH7spwTGHjDpL6WGb92ZiOLspq6e3SMVI6+zi3C1FxZzr7s7CKEA52b7xGuBasQs5I+TcZqwkNBDfhKVZoRe8Bjn/WM5R5I7GxDJSrEtA7fnz18ffTpFV0GFmO2puXvK2qlIW/vxLSHON1lOCZEBVjPQ9P7BkX6VpbW5HTBkydqZ4IhB4NWjIfxNkB8GeRaJrs6IqKyREHPf5hGMSexVsC0+fAHDhBx88YD5dK+4562P8c/7R57Cm14kuiMaeZ+lCbw88pyZ+bQ++t91/xgv5LEWez86xRU2u3YIiIBmQyL9+6WOK06ta6l6oD8Sfp3CRiiQnTZ3vcMhlffjybNCn99MrSbIm5Um/chdusdbiOF0B6iwsMe7R2FaEIWQxI6Z//ayYNDm2MObKpRxv+M5YZ/pu9blE1Yay4A1GPIFxLx4N4hmYe7hkiKYhm6C4ketViluptc88nU6H4bNHmepkQpZi5FopPNPix7nbqguKMYVpnecsWtgEQVr5c6cNvsCAyxEsxwgPOGJN DycZVEQP kANhRWUA7Ts1vzVNiPVKB8vx9tHb5nkead83HD/rCSrrPfv+3oABbeFyW1QKS4BgOFktzfQqd59D24hSuapxV2fV0FiigxcwmouhlxeDbQavF8E7T7nC5+MmcyR8jJVkJT7rCE5C5/oY8DkL2YFER2WbRcmwCly3up8cuH47v5kMOZdXhnejKvOHvnygxmfX3R5ntrf3Y9yjXUwkRUSDy59aLRT8bz9Nv7Jj4LuNKR0VZReSApkAZ06j1GWD7uL4ycqWtwNmUZ+Eof+KODO0FfwY4L3MNXho9ppHkuTseYt+1LEEBI9srnVnwOsp8q3y/nSr8kdEdl4pNjKCfFKU7jByakXsV+FDkSSRS86fKhymEa/Y= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
AMD broadcast TLB invalidation
|
expand
|
diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c index 29207dc5b807..266d5174fc7b 100644 --- a/arch/x86/mm/tlb.c +++ b/arch/x86/mm/tlb.c @@ -1074,6 +1074,12 @@ static void do_flush_tlb_all(void *info) void flush_tlb_all(void) { count_vm_tlb_event(NR_TLB_REMOTE_FLUSH); + if (cpu_feature_enabled(X86_FEATURE_INVLPGB)) { + guard(preempt)(); + invlpgb_flush_all(); + tlbsync(); + return; + } on_each_cpu(do_flush_tlb_all, NULL, 1); }
The flush_tlb_all() function is not used a whole lot, but we might as well use broadcast TLB flushing there, too. Signed-off-by: Rik van Riel <riel@surriel.com> --- arch/x86/mm/tlb.c | 6 ++++++ 1 file changed, 6 insertions(+)