irq_work: Make self-IPIs optable

On irq work initialization, let the user choose to define it
as "lazy" or not. "Lazy" means that we don't want to send
an IPI (provided the arch can anyway) when we enqueue this
work but we rather prefer to wait for the next timer tick
to execute our work if possible.

This is going to be a benefit for non-urgent enqueuers
(like printk in the future) that may prefer not to raise
an IPI storm in case of frequent enqueuing on short periods
of time.

Signed-off-by: Frederic Weisbecker <>
Acked-by: Steven Rostedt <>
Cc: Peter Zijlstra <>
Cc: Thomas Gleixner <>
Cc: Ingo Molnar <>
Cc: Andrew Morton <>
Cc: Paul Gortmaker <>
2 files changed