From: Anthony Liguori <anthony-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
To: "Dong, Eddie" <eddie.dong-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: kvm-devel <kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Subject: Re: [PATCH] Add need_resched check before go to kvm_resched
Date: Wed, 25 Apr 2007 21:15:33 -0500 [thread overview]
Message-ID: <46300B45.40107@codemonkey.ws> (raw)
In-Reply-To: <10EA09EFD8728347A513008B6B0DA77A0159A036-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
Dong, Eddie wrote:
> Anthony Liguori wrote:
>
>> Dong, Eddie wrote:
>>
>>> In this case, IOCTL return to Qemu will trigger scheduling at least.
>>>
>>>
>> I think a scheduling change won't happen until the next timer tick.
>> AFAICT, there's nothing explicit in the ioctl return path that will
>> result in rescheduling.
>>
>
> Do u mean Linux system call (IOCTL here) will not do scheudling check?
> (check TIF_NEED_RESCHED flag)
>
Walking through the syscall path, I don't see any place where it would
explicity check for rescheduling. That seems logical to me too since
the only time you should invoke the scheduler is after a timer interrupt
or within a long running task that would have pre-emption disabled
(which is what I think KVM qualifies as).
> Also another chance is vcpu_put() in kvm_vcpu_ioctl_run that
> will trigger rescheduling check IMO.
>
The fast path of vcpu_put() is mutex_unlock which assuming noone is
waiting on the mutex to be unlocked is just an atomic increment. I'm
not entirely sure if the waking up in the slow path will explicitly
trigger a rescheduling.
Regards,
Anthony Liguori
> Thx, eddie
>
>
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
next prev parent reply other threads:[~2007-04-26 2:15 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-25 12:40 [PATCH] Add need_resched check before go to kvm_resched Dong, Eddie
[not found] ` <10EA09EFD8728347A513008B6B0DA77A01599EB3-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-04-25 12:45 ` Avi Kivity
[not found] ` <462F4D58.7090607-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-04-25 13:17 ` Dong, Eddie
[not found] ` <10EA09EFD8728347A513008B6B0DA77A01599ECA-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-04-25 13:49 ` Avi Kivity
2007-04-25 13:49 ` Anthony Liguori
[not found] ` <462F5C7E.7010605-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
2007-04-25 13:53 ` Avi Kivity
2007-04-25 23:18 ` Dong, Eddie
[not found] ` <10EA09EFD8728347A513008B6B0DA77A01599F54-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-04-25 23:50 ` Anthony Liguori
[not found] ` <462FE952.5050907-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
2007-04-26 0:23 ` Dong, Eddie
[not found] ` <10EA09EFD8728347A513008B6B0DA77A01599FA7-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-04-26 0:35 ` Anthony Liguori
[not found] ` <462FF3B7.6010707-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
2007-04-26 1:04 ` Dong, Eddie
[not found] ` <10EA09EFD8728347A513008B6B0DA77A0159A036-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-04-26 2:15 ` Anthony Liguori [this message]
2007-04-26 4:46 ` Avi Kivity
[not found] ` <46302E8F.6070301-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-04-26 4:56 ` Anthony Liguori
2007-04-26 4:41 ` Avi Kivity
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=46300B45.40107@codemonkey.ws \
--to=anthony-rdkfgonbjusknkdkm+me6a@public.gmane.org \
--cc=eddie.dong-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox