linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [RFC] PPC: MPIC: necessary readback after EOI?
@ 2015-01-05 14:14 Purcareata Bogdan
  2015-01-05 17:46 ` Andreas Mohr
  2015-01-07 14:40 ` Benjamin Herrenschmidt
  0 siblings, 2 replies; 11+ messages in thread
From: Purcareata Bogdan @ 2015-01-05 14:14 UTC (permalink / raw)
  To: benh; +Cc: linuxppc-dev, linux-kernel

Hello,

While doing some performance testing of a KVM guest on a PPC platform, I 
noticed that there's a read of the CPU_WHOAMI register after each MPIC 
EOI [1]. This has been present since the initial implementation of the 
MPIC driver [2]. In a KVM virtualized environment, this results in an 
additional kvm_exit.

Is the read back necessary? Is it used to provide some sort of 
synchronization mechanism, making sure that nothing else is executed 
until the EOI write is finished? I eliminated the mpic_cpu_read call and 
run the kernel on hardware and noticed no anomaly, however I am not sure 
of all the implications and race conditions it might lead to.

I was curious why the mpic_cpu_read(MPIC_INFO(CPU_WHOAMI)) was there in 
the first place and if it's still needed. If it's still required, I 
guess a better approach is to eliminate the call only if the kernel is 
running on the KVM guest side, where the MPIC is emulated and no longer 
requires a readback.

Thank you,
Bogdan P.

[1] http://lxr.free-electrons.com/source/arch/powerpc/sysdev/mpic.c#L659
[2] https://lkml.org/lkml/2004/10/22/483

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

end of thread, other threads:[~2015-01-08 19:18 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-05 14:14 [RFC] PPC: MPIC: necessary readback after EOI? Purcareata Bogdan
2015-01-05 17:46 ` Andreas Mohr
2015-01-05 18:10   ` Scott Wood
2015-01-05 18:43     ` Andreas Mohr
2015-01-07  2:56       ` Scott Wood
2015-01-07 14:44     ` Benjamin Herrenschmidt
2015-01-07 17:04       ` Scott Wood
2015-01-08 19:17         ` Benjamin Herrenschmidt
2015-01-07 14:43   ` Benjamin Herrenschmidt
2015-01-07 14:40 ` Benjamin Herrenschmidt
2015-01-08  0:49   ` Segher Boessenkool

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).