From patchwork Mon Oct 17 14:54:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 3519 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp1493698wrs; Mon, 17 Oct 2022 07:57:05 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4RbTHH2uOsg/mmRIleO+Sj9THNemeD+lit1tuwp0BsHnWPdNd4d581do7OKveAq9pONoc0 X-Received: by 2002:a17:90a:1b0d:b0:20d:69b1:70c3 with SMTP id q13-20020a17090a1b0d00b0020d69b170c3mr14495243pjq.5.1666018625207; Mon, 17 Oct 2022 07:57:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666018625; cv=none; d=google.com; s=arc-20160816; b=Aul23izNa7AMznxKr0Bo0X29Aocj6/BmrMEslGn7wG1d1sW1UBgpcQKUz2FrIxca04 w8HB1Bku2ESZTO09c3duj5EO6bOncKlYwUg2jNAJ8uWorJDvr6Ad/6I1S8T5zN/LE1S2 jpy6Hb6wCaDwPfvEJCGyvfV6Sb5GXVsvvB66O70c6paFu0+3ei/NVElfiPNaSu0sLY43 EqwGdVEzoL+xcwt0FX1PHpkk/5JVNB14TagX24mwfvTM65ecWVTUw7MiLa4QH7QcoHSW m/PnICp3hNaxLU4NS/47JqsUtdNzo21of20CQ0AD0li5BAD+p0gv8iVDcDgZynqVUr8b YDYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=jHQlVXUTl5Uvj2rpEUA7h6spp5oD8taVEACtfEok5pU=; b=d94mfgrvq5ISLVr1xp4LS5d/C9yDro60TTCQZ3Q3OGUfdGGn+voSqaLcy+WvB+Wyf6 8MG4pgylpKSi91ZR5YuhnmgpOwnrumMwmH5YABqcP+BhqSS64JE3fqWoYWlvj2Fu9JgL U8SOe6xk/TNzvYbGFY7aJx8qB5iqAAkHX0QVcp8AgfFUkczfqgosb9nFX26Ew5D/AV97 kMUCLVp7Lwc8ecg+mMvi/MB3YiGAT7/YdwEAhfbZwkwzldW2uLEwYRgEsTzLw/Ig5u+K bnFsG9Q2Ifwyc4t/35iJm25rQ1sFgf3q1UdjCb9t6aX0PWOadcGDn3ZgCSTzaJ9zXKoW CS0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=w5ZmrZJf; dkim=neutral (no key) header.i=@linutronix.de header.b=W1PuyEFT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ha15-20020a17090af3cf00b00205f49b70fdsi10972608pjb.127.2022.10.17.07.56.50; Mon, 17 Oct 2022 07:57:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=w5ZmrZJf; dkim=neutral (no key) header.i=@linutronix.de header.b=W1PuyEFT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231387AbiJQO4Q (ORCPT + 99 others); Mon, 17 Oct 2022 10:56:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231174AbiJQOyP (ORCPT ); Mon, 17 Oct 2022 10:54:15 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A475E696C7; Mon, 17 Oct 2022 07:54:07 -0700 (PDT) Date: Mon, 17 Oct 2022 14:54:04 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1666018445; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jHQlVXUTl5Uvj2rpEUA7h6spp5oD8taVEACtfEok5pU=; b=w5ZmrZJf+o5YGab7xXK2VLL1RssGlF5f3+lyXeOslHawe2iw8narTVSnvjaQ12epdPgF0o 4WrP2A3KbOJY6YSpmXFhLVSsyOX/8EvGiWKsAblBywe1ypwvPdmUYJMCUvL+EaMTf1hDw9 s15JYHciKJdR8LbvlO9YIvFuAp18YZGNcRUTc79JGq/oYov5kwAsLDzWj2ICHKRaHWyVkq KgoAhwFVpIysZwthQ2E3Das7X20e/bLZgTcJnUzQrhQfi3aFIFRdzOlIlVzCXN+DjO9Lgn 4MXZ7/vzuLvEVYdByvOfvrDo0Gfatrw4SPvdZCO6C75Gt9AxiJjjvZ3e0qlQ+Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1666018445; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jHQlVXUTl5Uvj2rpEUA7h6spp5oD8taVEACtfEok5pU=; b=W1PuyEFT2sGDNdFmfqDimBYsGXnFgoG3n8W7PrG3I1RVSnN+VomGTwrAECkgT92aDROCUo rlb0Hboe9ABWloAg== From: "tip-bot2 for Thomas Gleixner" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/core] x86/softirq: Move softirq pending next to current task Cc: Thomas Gleixner , "Peter Zijlstra (Intel)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20220915111145.702133710@infradead.org> References: <20220915111145.702133710@infradead.org> MIME-Version: 1.0 Message-ID: <166601844447.401.2279136685209842168.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746947145822488771?= X-GMAIL-MSGID: =?utf-8?q?1746947145822488771?= The following commit has been merged into the x86/core branch of tip: Commit-ID: 7fcecafebed90d03f35bec6e147fc0b5f6e1bc71 Gitweb: https://git.kernel.org/tip/7fcecafebed90d03f35bec6e147fc0b5f6e1bc71 Author: Thomas Gleixner AuthorDate: Thu, 15 Sep 2022 13:11:06 +02:00 Committer: Peter Zijlstra CommitterDate: Mon, 17 Oct 2022 16:41:05 +02:00 x86/softirq: Move softirq pending next to current task Another hot variable which is strict per CPU and benefits from being in the same cache line. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220915111145.702133710@infradead.org --- arch/x86/include/asm/current.h | 1 + arch/x86/include/asm/hardirq.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/x86/include/asm/current.h b/arch/x86/include/asm/current.h index ac3090d..b89aba0 100644 --- a/arch/x86/include/asm/current.h +++ b/arch/x86/include/asm/current.h @@ -19,6 +19,7 @@ struct pcpu_hot { int cpu_number; unsigned long top_of_stack; void *hardirq_stack_ptr; + u16 softirq_pending; #ifdef CONFIG_X86_64 bool hardirq_stack_inuse; #else diff --git a/arch/x86/include/asm/hardirq.h b/arch/x86/include/asm/hardirq.h index 275e7fd..66837b8 100644 --- a/arch/x86/include/asm/hardirq.h +++ b/arch/x86/include/asm/hardirq.h @@ -3,9 +3,9 @@ #define _ASM_X86_HARDIRQ_H #include +#include typedef struct { - u16 __softirq_pending; #if IS_ENABLED(CONFIG_KVM_INTEL) u8 kvm_cpu_l1tf_flush_l1d; #endif @@ -60,6 +60,7 @@ extern u64 arch_irq_stat_cpu(unsigned int cpu); extern u64 arch_irq_stat(void); #define arch_irq_stat arch_irq_stat +#define local_softirq_pending_ref pcpu_hot.softirq_pending #if IS_ENABLED(CONFIG_KVM_INTEL) static inline void kvm_set_cpu_l1tf_flush_l1d(void)