[Top][All Lists]
[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?
- [Qemu-devel] Re: [PATCH 22/32] add next_cpu_index, (continued)
- [Qemu-devel] [PATCH 23/32] move cpu_get_time_fast to kqemu.c, Glauber Costa, 2008/10/23
- [Qemu-devel] [PATCH 26/32] provide two accelerators for kqemu, Glauber Costa, 2008/10/23
- [Qemu-devel] [PATCH 24/32] check wether kqemu is enabled in open code, Glauber Costa, 2008/10/23
- [Qemu-devel] [PATCH 20/32] accel_trace_io, Glauber Costa, 2008/10/23
- [Qemu-devel] [PATCH 27/32] arch-specific hooks for accelerator, Glauber Costa, 2008/10/23
- [Qemu-devel] [PATCH 31/32] remove kqemu_is_ok tests., Glauber Costa, 2008/10/23
- [Qemu-devel] [PATCH 30/32] lcall/lret arch specific accel hooks, Glauber Costa, 2008/10/23
- [Qemu-devel] [PATCH 25/32] provide accel hook for cpu_exec, Glauber Costa, 2008/10/23
- [Qemu-devel] [PATCH 32/32] clean up kqemu code, Glauber Costa, 2008/10/23