From: Frederic Weisbecker <frederic@kernel.org>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Frederic Weisbecker <frederic@kernel.org>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Tony Luck <tony.luck@intel.com>,
Peter Zijlstra <peterz@infradead.org>,
"David S . Miller" <davem@davemloft.net>,
Michael Ellerman <mpe@ellerman.id.au>,
Helge Deller <deller@gmx.de>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@kernel.org>, Fenghua Yu <fenghua.yu@intel.com>,
"James E . J . Bottomley" <jejb@parisc-linux.org>
Subject: [PATCH 03/10] softirq: Turn default irq_cpustat_t to standard per-cpu
Date: Sat, 31 Mar 2018 05:34:46 +0200 [thread overview]
Message-ID: <1522467293-7320-4-git-send-email-frederic@kernel.org> (raw)
In-Reply-To: <1522467293-7320-1-git-send-email-frederic@kernel.org>
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@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: David S. Miller <davem@davemloft.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: James E.J. Bottomley <jejb@parisc-linux.org>
Cc: Helge Deller <deller@gmx.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
---
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 4954948..ddea03c 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 24d243e..fdbb171 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;
--
2.7.4
next prev parent reply other threads:[~2018-03-31 3:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-31 3:34 [PATCH 00/10] softirq: Consolidate and optimize softirq mask v2 Frederic Weisbecker
2018-03-31 3:34 ` [PATCH 01/10] ia64: Convert local_softirq_pending() to per-cpu ops Frederic Weisbecker
2018-03-31 3:34 ` [PATCH 02/10] sparc: Convert local_softirq_pending() to use per-cpu op Frederic Weisbecker
2018-03-31 3:34 ` Frederic Weisbecker [this message]
2018-03-31 3:34 ` [PATCH 04/10] softirq: Consolidate default local_softirq_pending() implementations Frederic Weisbecker
2018-03-31 3:34 ` [PATCH 05/10] ia64: Switch to generic local_softirq_pending() implementation Frederic Weisbecker
2018-03-31 3:34 ` [PATCH 06/10] parisc: " Frederic Weisbecker
2018-03-31 3:34 ` [PATCH 07/10] powerpc: " Frederic Weisbecker
2018-04-04 10:20 ` Michael Ellerman
2018-03-31 3:34 ` [PATCH 08/10] sparc: " Frederic Weisbecker
2018-03-31 3:34 ` [PATCH 09/10] x86: " Frederic Weisbecker
2018-03-31 3:34 ` [PATCH 10/10] softirq/s390: Move default mutators of overwritten softirq mask to s390 Frederic Weisbecker
-- strict thread matches above, loose matches on Subject: below --
2018-04-24 14:09 [GIT PULL] softirq: Consolidate and optimize softirq mask v3 Frederic Weisbecker
2018-04-24 14:09 ` [PATCH 03/10] softirq: Turn default irq_cpustat_t to standard per-cpu Frederic Weisbecker
2018-03-29 2:26 [PATCH 00/10] softirq: Consolidate and optimize softirq mask Frederic Weisbecker
2018-03-29 2:26 ` [PATCH 03/10] softirq: Turn default irq_cpustat_t to standard per-cpu Frederic Weisbecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1522467293-7320-4-git-send-email-frederic@kernel.org \
--to=frederic@kernel.org \
--cc=benh@kernel.crashing.org \
--cc=bigeasy@linutronix.de \
--cc=davem@davemloft.net \
--cc=deller@gmx.de \
--cc=fenghua.yu@intel.com \
--cc=jejb@parisc-linux.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.