All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Hebbal Yacine <y_hebbal@esi.dz>
Cc: kvm@vger.kernel.org, Wanpeng Li <wanpeng.li@hotmail.com>
Subject: Re: Difference between vcpu_load and kvm_sched_in ?
Date: Wed, 21 Oct 2015 12:25:43 +0200	[thread overview]
Message-ID: <56276827.2040900@redhat.com> (raw)
In-Reply-To: <CACEoar52w8qU2bbSTGKJdq++jz3gppLQ0N-xqsS-pnYMNnaK3Q@mail.gmail.com>



On 21/10/2015 12:17, Hebbal Yacine wrote:
> Thanks for the explanation, it's very clear.
> I tired that but I didn't succeed to send the ioctl from "run_on_cpu"
> function, I didn't find how to set the right CPUStat
> I've tried "current_cpu"

Current_cpu is always NULL outside the VCPU thread.

> 
> kvm_main.c:
> 
> // yacine.begin
> 
> static void do_vmi_start_kvm_ioctl(void *type) {
>     printf("do_vmi_start_kvm_ioctl\n");
>     kvm_vm_ioctl(kvm_state, type);

Are you sure you want a VM ioctl and not a VCPU ioctl?  Or perhaps a VM
ioctl to do generic processing, and a VCPU ioctl that is then sent to
all VCPUs?

If you use a VCPU ioctl, you can use CPU_FOREACH or a for loop to
iterate over all VCPUs.

Paolo

  parent reply	other threads:[~2015-10-21 10:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-20  9:57 Difference between vcpu_load and kvm_sched_in ? Yacine
2015-10-20 15:44 ` Paolo Bonzini
2015-10-20 22:57   ` Wanpeng Li
2015-10-21  6:46     ` Paolo Bonzini
2015-10-21 10:20       ` Yacine HEBBAL
2015-10-22  7:33       ` Wanpeng Li
     [not found]   ` <CACEoar52w8qU2bbSTGKJdq++jz3gppLQ0N-xqsS-pnYMNnaK3Q@mail.gmail.com>
2015-10-21 10:25     ` Paolo Bonzini [this message]
2015-10-21 17:21       ` Yacine HEBBAL
2015-10-22  9:37         ` Paolo Bonzini

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=56276827.2040900@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=wanpeng.li@hotmail.com \
    --cc=y_hebbal@esi.dz \
    /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.