linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* x86: Inconsistent xAPIC synchronization in arch_irq_work_raise?
@ 2014-01-21 13:02 Jan Kiszka
  2014-01-21 14:01 ` Peter Zijlstra
  0 siblings, 1 reply; 13+ messages in thread
From: Jan Kiszka @ 2014-01-21 13:02 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Thomas Gleixner, H. Peter Anvin
  Cc: Linux Kernel Mailing List

Hi all,

while trying to plug a race in the CPU hotplug code on xAPIC systems, I
was analyzing IPI transmission patterns. The handlers in
arch/x86/include/asm/ipi.h first wait for ICR, then send. In contrast,
arch_irq_work_raise sends the self-IPI directly and then waits. This
looks inconsistent. Is it intended?

BTW, the races are in wakeup_secondary_cpu_via_init and
wakeup_secondary_cpu_via_nmi (lacking IRQ disable around ICR accesses).
There we also send first, then wait for completion. But I guess that is
due to the code originally only being used during boot. Will send fixes
for those once the sync pattern is clear to me.

Jan

-- 
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux

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

end of thread, other threads:[~2014-01-23 20:17 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-21 13:02 x86: Inconsistent xAPIC synchronization in arch_irq_work_raise? Jan Kiszka
2014-01-21 14:01 ` Peter Zijlstra
2014-01-21 14:10   ` Ingo Molnar
2014-01-21 14:11   ` Jan Kiszka
2014-01-21 14:34     ` Jan Kiszka
2014-01-21 14:51   ` Peter Zijlstra
2014-01-21 23:20     ` Huang Ying
2014-01-22 18:43       ` Andi Kleen
2014-01-23 18:51         ` Jan Kiszka
2014-01-23 19:11           ` Peter Zijlstra
2014-01-23 19:22           ` Andi Kleen
2014-01-23 19:51             ` Jan Kiszka
2014-01-23 20:17               ` Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).