public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>, KVM <kvm@vger.kernel.org>,
	Alexander Graf <agraf@suse.de>
Subject: Re: [PATCH] KVM: don't sent IPI if the vcpu is not online
Date: Mon, 06 Sep 2010 08:46:07 +0300	[thread overview]
Message-ID: <4C84801F.9060803@redhat.com> (raw)
In-Reply-To: <4C844887.9090802@cn.fujitsu.com>

  On 09/06/2010 04:48 AM, Xiao Guangrong wrote:
> On 09/05/2010 03:18 PM, Avi Kivity wrote:
>>   On 09/03/2010 07:12 AM, Xiao Guangrong wrote:
>>> It's no need sent IPI to the vcpu which is schedule out
>>>
>>>
>>> @@ -86,6 +86,7 @@ struct kvm_vcpu {
>>>        unsigned long requests;
>>>        unsigned long guest_debug;
>>>        int srcu_idx;
>>> +    bool online;
>> Why not check for guest_mode instead?
>>
> Oh, i forget it...but 'vcpu->guest_mode' is only used in x86 platform,
> and make_all_cpus_request() is a common function.

We can have a function kvm_vcpu_guest_mode() that is defined differently 
for x86 and the other.

> So, maybe it's better use 'vcpu->online' here, and move 'guest_mode' into
> 'vcpu->arch' ?

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.

-- 
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.


  reply	other threads:[~2010-09-06  5:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-03  4:12 [PATCH] KVM: don't sent IPI if the vcpu is not online Xiao Guangrong
2010-09-05  7:18 ` Avi Kivity
2010-09-06  1:48   ` Xiao Guangrong
2010-09-06  5:46     ` Avi Kivity [this message]
2010-09-06  8:51       ` Alexander Graf
2010-09-06  8:55         ` Avi Kivity
2010-09-06  8:59           ` Alexander Graf
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=4C84801F.9060803@redhat.com \
    --to=avi@redhat.com \
    --cc=agraf@suse.de \
    --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