[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-0f6f47bacba514f4e9f61de0d85940dfb41498cc@git.kernel.org>
Date: Mon, 14 May 2018 05:48:52 -0700
From: tip-bot for Frederic Weisbecker <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: paulus@...ba.org, mpe@...erman.id.au, tglx@...utronix.de,
peterz@...radead.org, frederic@...nel.org, dalias@...c.org,
linux-kernel@...r.kernel.org, fenghua.yu@...el.com, deller@....de,
schwidefsky@...ibm.com, benh@...nel.crashing.org,
davem@...emloft.net, bigeasy@...utronix.de, jejb@...isc-linux.org,
mingo@...nel.org, torvalds@...ux-foundation.org,
ysato@...rs.sourceforge.jp, heiko.carstens@...ibm.com,
hpa@...or.com, tony.luck@...el.com
Subject: [tip:irq/core] softirq/core: Turn default irq_cpustat_t to standard
per-cpu
Commit-ID: 0f6f47bacba514f4e9f61de0d85940dfb41498cc
Gitweb: https://git.kernel.org/tip/0f6f47bacba514f4e9f61de0d85940dfb41498cc
Author: Frederic Weisbecker <frederic@...nel.org>
AuthorDate: Tue, 8 May 2018 15:38:19 +0200
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Mon, 14 May 2018 11:25:27 +0200
softirq/core: Turn default irq_cpustat_t to standard per-cpu
In order to optimize and consolidate softirq mask accesses, let's
convert the default irq_cpustat_t implementation to per-CPU standard API.
Signed-off-by: Frederic Weisbecker <frederic@...nel.org>
Acked-by: Thomas Gleixner <tglx@...utronix.de>
Acked-by: Peter Zijlstra <peterz@...radead.org>
Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>
Cc: David S. Miller <davem@...emloft.net>
Cc: Fenghua Yu <fenghua.yu@...el.com>
Cc: Heiko Carstens <heiko.carstens@...ibm.com>
Cc: Helge Deller <deller@....de>
Cc: James E.J. Bottomley <jejb@...isc-linux.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Martin Schwidefsky <schwidefsky@...ibm.com>
Cc: Michael Ellerman <mpe@...erman.id.au>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Rich Felker <dalias@...c.org>
Cc: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: Tony Luck <tony.luck@...el.com>
Cc: Yoshinori Sato <ysato@...rs.sourceforge.jp>
Link: http://lkml.kernel.org/r/1525786706-22846-5-git-send-email-frederic@kernel.org
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
include/linux/irq_cpustat.h | 4 ++--
kernel/softirq.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/linux/irq_cpustat.h b/include/linux/irq_cpustat.h
index 4954948d1973..ddea03c7c39d 100644
--- a/include/linux/irq_cpustat.h
+++ b/include/linux/irq_cpustat.h
@@ -18,8 +18,8 @@
*/
#ifndef __ARCH_IRQ_STAT
-extern irq_cpustat_t irq_stat[]; /* defined in asm/hardirq.h */
-#define __IRQ_STAT(cpu, member) (irq_stat[cpu].member)
+DECLARE_PER_CPU_ALIGNED(irq_cpustat_t, irq_stat); /* defined in asm/hardirq.h */
+#define __IRQ_STAT(cpu, member) (per_cpu(irq_stat.member, cpu))
#endif
/* arch independent irq_stat fields */
diff --git a/kernel/softirq.c b/kernel/softirq.c
index 177de3640c78..c5fafd792df1 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -49,8 +49,8 @@
*/
#ifndef __ARCH_IRQ_STAT
-irq_cpustat_t irq_stat[NR_CPUS] ____cacheline_aligned;
-EXPORT_SYMBOL(irq_stat);
+DEFINE_PER_CPU_ALIGNED(irq_cpustat_t, irq_stat);
+EXPORT_PER_CPU_SYMBOL(irq_stat);
#endif
static struct softirq_action softirq_vec[NR_SOFTIRQS] __cacheline_aligned_in_smp;
Powered by blists - more mailing lists