qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] introduce on_vcpu


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH] introduce on_vcpu
Date: Thu, 16 Jul 2009 16:35:11 -0500
User-agent: Thunderbird 2.0.0.21 (X11/20090320)

Glauber Costa wrote:
On Thu, Jul 16, 2009 at 04:25:12PM -0500, Anthony Liguori wrote:
Glauber Costa wrote:
Yes. Purpose of using curren_env was just to make it look more like qemu-kvm
But I do understand that we'll have to change it anyway for this code to
have any actual value, so I'm fine with using cpu_single_env.
Yeah, if qemu-kvm is introduce another global current CPUState variable, then the qemu-kvm code has to change :-)

Since qemu-kvm keeps a thread id in CPUState, it would make more sense to check whether gettid() == env->thread_id, no?
disagree.
gettid involves a syscall.

You're prematurely optimizing. a gettid syscall likely costs around 150-200 cycles.

 current_env in qemu-kvm is a TLS variable.
probably much cheaper.




--
Regards,

Anthony Liguori





reply via email to

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