All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] Bottom halves VS timers
@ 2019-01-22  7:15 Pavel Dovgalyuk
  2019-01-22  8:49 ` Paolo Bonzini
  0 siblings, 1 reply; 3+ messages in thread
From: Pavel Dovgalyuk @ 2019-01-22  7:15 UTC (permalink / raw)
  To: qemu-devel; +Cc: pbonzini, peter.maydell, stefanha, famz, kwolf

Hi!

 

I recently debugged record/replay for some platform which uses PIO access for IDE.

Handlers for these operations are called through BHs.

Scheduling new BH does not create a signal for the vCPU to suspend the execution and

process the main loop events (in record/replay we synchronize these two threads).

Therefore vCPU may execute 10000000 instruction until BH processing and the guest

software may get a timeout.

 

I thought about replacing BH to the timers with period=0. This solution has the following
properties:

1.       Avoid code duplication (BH and timers do virtually the same operations)

2.       Timers affect the vCPU - adding new virtual timer suspends the execution to process the
callback

3.       Timers are deterministic in record/replay mode (virtual ones of course). We have similar
deterministic concept for BHs, but selecting between virtual and realtime should be more familiar
for other developers.

4.       Timers require a little bit more code, but this could be solved with better interfaces

 

What do you think about this?

Did I miss anything?

 

Pavel Dovgalyuk

 

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

end of thread, other threads:[~2019-01-22 11:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-22  7:15 [Qemu-devel] Bottom halves VS timers Pavel Dovgalyuk
2019-01-22  8:49 ` Paolo Bonzini
2019-01-22 11:31   ` Pavel Dovgalyuk

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.