qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH 20/32] accel_trace_io


From: Glauber de Oliveira Costa
Subject: [Qemu-devel] Re: [PATCH 20/32] accel_trace_io
Date: Thu, 23 Oct 2008 13:26:32 -0400 (EDT)

----- "Anthony Liguori" <address@hidden> wrote:

> Glauber Costa wrote:
> > From: Glauber Costa <address@hidden>
> >
> > kqemu keeps trace of the last io done. Do it through
> > an accel_wrapper.
> >   
> 
> The hooks here are probably not the best they could be.  The purpose
> of 
> this code in kqemu, from what I can tell, is to control how long we
> run 
> in softmmu before trying to run in the kernel again.  I presume this
> is 
> mainly for kernel-kqemu.
> 
> When kernel-kqemu encounters an instruction it can't handle, it drops
> to 
> userspace and runs in softmmu for a while.  The question is how long 
> should it run in softmmu and this is a heuristic.  This is what the
> code 
> is doing.
> 
> Regards,

My proposal is:

* add a hook for in and another for out operations. It's generic enough to be 
useful
  for other purposes in the future. KVM does not need to do anything in here, 
and kqemu can
  just record the last io time
* add a hook at th end of cpu_exec, that allows the accel to shut off current 
execution based
  on any criteria it wants to. accel_break_loop (the current one) seems a fine 
name for it.
  To be even more explicit, the accel can just return 1 or 0 indicating whether 
or not the current
  execution loop should be stopped, and cpu_loop_exit() is called based on the 
return value.

What do you think?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]