qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] CPU TLB flush with multithread TCG.
@ 2015-02-09 10:02 Frederic Konrad
  2015-02-11  3:33 ` Alex Bennée
  0 siblings, 1 reply; 5+ messages in thread
From: Frederic Konrad @ 2015-02-09 10:02 UTC (permalink / raw)
  To: qemu-devel, mttcg
  Cc: Peter Maydell, Jan Kiszka, Alexander Graf, Paolo Bonzini

Hi everybody,

In multithread tlb_flush is broken as CPUA can flush an other CPUB and 
CPUB can be
executing code, and fixing this can be quite hard:
   * We need to exit the CPU which is flushed.
   * Makes sure the CPU is stopped.
   * Then we can flush tlb.
The big issues are:
   * Two threads can be doing a flush at the same time.
   * Something can restart the CPU during the flush.

A better idea I think is that instead of flushing tlb we can put a flag 
in CPUState such
as flush_request and ask the cpu to exit.
Then later once the CPU is exited we can flush tlbs if flush_request is set.
It will ensure that the CPU won't execute code as it's associated thread 
will be
flushing.

Can this work?

Thanks,
Fred

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

end of thread, other threads:[~2015-02-11 17:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-09 10:02 [Qemu-devel] CPU TLB flush with multithread TCG Frederic Konrad
2015-02-11  3:33 ` Alex Bennée
2015-02-11  8:35   ` Mark Burton
2015-02-11  8:42   ` Frederic Konrad
2015-02-11 17:17     ` Frederic Konrad

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