All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <aliguori@us.ibm.com>
To: Glauber Costa <glommer@redhat.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] introduce on_vcpu
Date: Thu, 16 Jul 2009 16:35:11 -0500	[thread overview]
Message-ID: <4A5F9D0F.6030906@us.ibm.com> (raw)
In-Reply-To: <20090716213520.GB4019@poweredge.glommer>

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	other threads:[~2009-07-16 21:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-14 16:47 [Qemu-devel] [PATCH] introduce on_vcpu Glauber Costa
2009-07-16 21:19 ` Anthony Liguori
2009-07-16 21:29   ` Glauber Costa
2009-07-16 21:25     ` Anthony Liguori
2009-07-16 21:35       ` Glauber Costa
2009-07-16 21:35         ` Anthony Liguori [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A5F9D0F.6030906@us.ibm.com \
    --to=aliguori@us.ibm.com \
    --cc=glommer@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.