All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] irqflags: fix (at least latent) code generation issue
@ 2014-11-04  8:23 Jan Beulich
  2014-11-10 12:13 ` Ingo Molnar
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Beulich @ 2014-11-04  8:23 UTC (permalink / raw)
  To: linux-kernel; +Cc: Steven Rostedt, akpm, mingo

The conditional in local_irq_restore() otherwise can cause code bloat
(the if and else blocks may get translated into separate code paths
despite the generated code being identical, dependent on compiler
internal heuristics). Note that this adjustment gets the code in sync
with the comment preceding it (which was slightly wrong from at least
from 2.6.37 onwards).

The code bloat was observed in reality with an experimental x86 patch
I'm about to post as RFC.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
 include/linux/irqflags.h |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- 3.18-rc3/include/linux/irqflags.h
+++ 3.18-rc3-irqflags/include/linux/irqflags.h
@@ -85,7 +85,7 @@
  * The local_irq_*() APIs are equal to the raw_local_irq*()
  * if !TRACE_IRQFLAGS.
  */
-#ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT
+#ifdef CONFIG_TRACE_IRQFLAGS
 #define local_irq_enable() \
 	do { trace_hardirqs_on(); raw_local_irq_enable(); } while (0)
 #define local_irq_disable() \
@@ -131,7 +131,7 @@
 	} while (0)
 
 
-#else /* !CONFIG_TRACE_IRQFLAGS_SUPPORT */
+#else /* !CONFIG_TRACE_IRQFLAGS */
 
 #define local_irq_enable()	do { raw_local_irq_enable(); } while (0)
 #define local_irq_disable()	do { raw_local_irq_disable(); } while (0)
@@ -145,6 +145,6 @@
 #define irqs_disabled_flags(flags) (raw_irqs_disabled_flags(flags))
 #define safe_halt()		do { raw_safe_halt(); } while (0)
 
-#endif /* CONFIG_TRACE_IRQFLAGS_SUPPORT */
+#endif /* CONFIG_TRACE_IRQFLAGS */
 
 #endif




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-11-28 17:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-04  8:23 [PATCH] irqflags: fix (at least latent) code generation issue Jan Beulich
2014-11-10 12:13 ` Ingo Molnar
2014-11-28 17:10   ` Jan Beulich

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.