Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1206702
| From | "tip-bot for Chen, Gong" <tipbot@zytor.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [tip:ras/core] x86/mce: Don't use percpu workqueues |
| Date | 2015-08-13 12:50 +0200 |
| Message-ID | <pWYf8-St-13@gated-at.bofh.it> (permalink) |
| References | <pWHej-1sf-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Commit-ID: 061120aed7081b9a4393fbe07b558192f40ad911
Gitweb: http://git.kernel.org/tip/061120aed7081b9a4393fbe07b558192f40ad911
Author: Chen, Gong <gong.chen@linux.intel.com>
AuthorDate: Wed, 12 Aug 2015 18:29:35 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 13 Aug 2015 10:12:51 +0200
x86/mce: Don't use percpu workqueues
An MCE is a rare event. Therefore, there's no need to have
per-CPU instances of both normal and IRQ workqueues. Make them
both global.
Signed-off-by: Chen, Gong <gong.chen@linux.intel.com>
[ Fold in subsequent patch from Rui/Boris/Tony for early boot logging. ]
Signed-off-by: Tony Luck <tony.luck@intel.com>
[ Massage commit message. ]
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1439396985-12812-4-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/kernel/cpu/mcheck/mce.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index a41c014..456f8d7 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -110,7 +110,8 @@ DEFINE_PER_CPU(mce_banks_t, mce_poll_banks) = {
*/
mce_banks_t mce_banks_ce_disabled;
-static DEFINE_PER_CPU(struct work_struct, mce_work);
+static struct work_struct mce_work;
+static struct irq_work mce_irq_work;
static void (*quirk_no_way_out)(int bank, struct mce *m, struct pt_regs *regs);
@@ -526,11 +527,9 @@ int mce_available(struct cpuinfo_x86 *c)
static void mce_schedule_work(void)
{
if (!mce_ring_empty())
- schedule_work(this_cpu_ptr(&mce_work));
+ schedule_work(&mce_work);
}
-static DEFINE_PER_CPU(struct irq_work, mce_irq_work);
-
static void mce_irq_work_cb(struct irq_work *entry)
{
mce_notify_irq();
@@ -551,7 +550,7 @@ static void mce_report_event(struct pt_regs *regs)
return;
}
- irq_work_queue(this_cpu_ptr(&mce_irq_work));
+ irq_work_queue(&mce_irq_work);
}
/*
@@ -1742,8 +1741,6 @@ void mcheck_cpu_init(struct cpuinfo_x86 *c)
__mcheck_cpu_init_generic();
__mcheck_cpu_init_vendor(c);
__mcheck_cpu_init_timer();
- INIT_WORK(this_cpu_ptr(&mce_work), mce_process_work);
- init_irq_work(this_cpu_ptr(&mce_irq_work), &mce_irq_work_cb);
}
/*
@@ -2064,6 +2061,9 @@ int __init mcheck_init(void)
mcheck_intel_therm_init();
mcheck_vendor_init_severity();
+ INIT_WORK(&mce_work, mce_process_work);
+ init_irq_work(&mce_irq_work, mce_irq_work_cb);
+
return 0;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/13] x86/RAS queue for 4.3 Borislav Petkov <bp@alien8.de> - 2015-08-12 18:40 +0200
[PATCH 07/13] x86/mce: Remove unused function declarations Borislav Petkov <bp@alien8.de> - 2015-08-12 18:40 +0200
[tip:ras/core] x86/mce: Remove unused function declarations tip-bot for Ashok Raj <tipbot@zytor.com> - 2015-08-13 12:50 +0200
[PATCH 05/13] x86/mce: Avoid potential deadlock due to printk() in MCE context Borislav Petkov <bp@alien8.de> - 2015-08-12 18:40 +0200
[tip:ras/core] x86/mce: Avoid potential deadlock due to printk() in MCE context "tip-bot for Chen, Gong" <tipbot@zytor.com> - 2015-08-13 12:50 +0200
[PATCH 08/13] x86/mce: Clear Local MCE opt-in before kexec Borislav Petkov <bp@alien8.de> - 2015-08-12 18:40 +0200
[tip:ras/core] x86/mce: Clear Local MCE opt-in before kexec tip-bot for Ashok Raj <tipbot@zytor.com> - 2015-08-13 12:50 +0200
[PATCH 12/13] x86/mce: Add a wrapper around mce_log() for injection Borislav Petkov <bp@alien8.de> - 2015-08-12 18:40 +0200
[tip:ras/core] x86/mce: Add a wrapper around mce_log() for injection tip-bot for Borislav Petkov <tipbot@zytor.com> - 2015-08-13 13:00 +0200
[PATCH 03/13] x86/mce: Don't use percpu workqueues Borislav Petkov <bp@alien8.de> - 2015-08-12 18:40 +0200
[tip:ras/core] x86/mce: Don't use percpu workqueues "tip-bot for Chen, Gong" <tipbot@zytor.com> - 2015-08-13 12:50 +0200
[PATCH 11/13] x86/mce: Rename rcu_dereference_check_mce() to mce_log_get_idx_check() Borislav Petkov <bp@alien8.de> - 2015-08-12 18:40 +0200
[tip:ras/core] x86/mce: Rename rcu_dereference_check_mce() to mce_log_get_idx_check() tip-bot for Borislav Petkov <tipbot@zytor.com> - 2015-08-13 13:00 +0200
[PATCH 04/13] x86/mce: Remove the MCE ring for Action Optional errors Borislav Petkov <bp@alien8.de> - 2015-08-12 18:40 +0200
[tip:ras/core] x86/mce: Remove the MCE ring for Action Optional errors "tip-bot for Chen, Gong" <tipbot@zytor.com> - 2015-08-13 12:50 +0200
[PATCH 13/13] x86/ras: Move AMD MCE injector to arch/x86/ras/ Borislav Petkov <bp@alien8.de> - 2015-08-12 18:40 +0200
[tip:ras/core] x86/ras: Move AMD MCE injector to arch/x86/ras/ tip-bot for Borislav Petkov <tipbot@zytor.com> - 2015-08-13 13:00 +0200
[PATCH 10/13] RAS: Add a menuconfig option with descriptive text Borislav Petkov <bp@alien8.de> - 2015-08-12 18:40 +0200
[tip:ras/core] RAS: Add a menuconfig option with descriptive text tip-bot for Borislav Petkov <tipbot@zytor.com> - 2015-08-13 13:00 +0200
csiph-web