diff options
| author | Peter Zijlstra <[email protected]> | 2014-02-11 16:01:16 +0100 |
|---|---|---|
| committer | Thomas Gleixner <[email protected]> | 2014-02-21 21:49:07 +0100 |
| commit | cd578abb24aa67ce468c427d3356c08ea32cf768 (patch) | |
| tree | 974a97cebfc368e8bee9c1beccbbd9bda00d89ef /include/linux | |
| parent | 90ed5b0fa5eb96e1cbb34aebf6a9ed96ee1587ec (diff) | |
perf/x86: Warn to early_printk() in case irq_work is too slow
On Mon, Feb 10, 2014 at 08:45:16AM -0800, Dave Hansen wrote:
> The reason I coded this up was that NMIs were firing off so fast that
> nothing else was getting a chance to run. With this patch, at least the
> printk() would come out and I'd have some idea what was going on.
It will start spewing to early_printk() (which is a lot nicer to use
from NMI context too) when it fails to queue the IRQ-work because its
already enqueued.
It does have the false-positive for when two CPUs trigger the warn
concurrently, but that should be rare and some extra clutter on the
early printk shouldn't be a problem.
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: Dave Hansen <[email protected]>
Cc: [email protected]
Fixes: 6a02ad66b2c4 ("perf/x86: Push the duration-logging printk() to IRQ context")
Signed-off-by: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Thomas Gleixner <[email protected]>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/irq_work.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/irq_work.h b/include/linux/irq_work.h index add13c8624b7..19ae05d4b8ec 100644 --- a/include/linux/irq_work.h +++ b/include/linux/irq_work.h @@ -32,7 +32,7 @@ void init_irq_work(struct irq_work *work, void (*func)(struct irq_work *)) #define DEFINE_IRQ_WORK(name, _f) struct irq_work name = { .func = (_f), } -void irq_work_queue(struct irq_work *work); +bool irq_work_queue(struct irq_work *work); void irq_work_run(void); void irq_work_sync(struct irq_work *work); |