mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: Avi Kivity <avi@redhat.com>
Cc: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>, KVM <kvm@vger.kernel.org>
Subject: Re: [PATCH] KVM: don't sent IPI if the vcpu is not online
Date: Mon, 6 Sep 2010 10:59:03 +0200	[thread overview]
Message-ID: <633F01D5-D6AD-40F3-8864-C3AE4D314E30@suse.de> (raw)
In-Reply-To: <4C84AC6B.4090306@redhat.com>


On 06.09.2010, at 10:55, Avi Kivity wrote:

> On 09/06/2010 11:51 AM, Alexander Graf wrote:
>> 
>>> I think guest_mode makes sense for the other archs for reducing IPIs, so let's leave it common and recommend that they implement it.  Alex, if you're ever bored.
>> What does the bit do? Do we have documentation on it ;)? No seriously, what's the intent of the field?
>> 
> 
> It indicates that the vcpu is currently executing guest code.  Which in turn is important if you need to force it out of guest mode in order to inject an interrupt or flush the tlb.

Well, a vcpu is either offline in halt state or in guest mode, no? So we can conclude that guest_mode == !offline && !halt_state.

When in halt state, we are active on the wakeup waitqueue:

static void kvmppc_decrementer_func(unsigned long data)
{
        struct kvm_vcpu *vcpu = (struct kvm_vcpu *)data;

        kvmppc_core_queue_dec(vcpu);

        if (waitqueue_active(&vcpu->wq)) {
                wake_up_interruptible(&vcpu->wq);
                vcpu->stat.halt_wakeup++;
        }
}

Shouldn't that be enough information already?


Alex


  reply	other threads:[~2010-09-06  8:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-03  4:12 Xiao Guangrong
2010-09-05  7:18 ` Avi Kivity
2010-09-06  1:48   ` Xiao Guangrong
2010-09-06  5:46     ` Avi Kivity
2010-09-06  8:51       ` Alexander Graf
2010-09-06  8:55         ` Avi Kivity
2010-09-06  8:59           ` Alexander Graf [this message]
2010-09-06  9:05             ` Avi Kivity
2010-09-06  9:09               ` Alexander Graf
2010-09-06  9:14                 ` Avi Kivity
2010-09-06  9:19                   ` Alexander Graf

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=633F01D5-D6AD-40F3-8864-C3AE4D314E30@suse.de \
    --to=agraf@suse.de \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=xiaoguangrong@cn.fujitsu.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®