From: Ingo Molnar <mingo@elte.hu>
To: Avi Kivity <avi@qumranet.com>
Cc: kvm-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org,
shaohua.li@intel.com
Subject: Re: [PATCH][RFC] kvm-scheduler integration
Date: Sun, 8 Jul 2007 15:35:39 +0200 [thread overview]
Message-ID: <20070708133539.GA12597@elte.hu> (raw)
In-Reply-To: <11838994974161-git-send-email-avi@qumranet.com>
* Avi Kivity <avi@qumranet.com> wrote:
> +#ifdef CONFIG_SCHED_KVM
> +static __read_mostly struct sched_kvm_hooks kvm_hooks;
> +#endif
please just add a current->put_vcpu() function pointer instead of this
hooks thing.
> static inline void prepare_task_switch(struct rq *rq, struct task_struct *next)
> {
> + unload_kvm_vcpu(current);
> prepare_lock_switch(rq, next);
> prepare_arch_switch(next);
> }
> @@ -1860,6 +1912,7 @@ static inline void finish_task_switch(struct rq *rq, struct task_struct *prev)
> prev_state = prev->state;
> finish_arch_switch(prev);
> finish_lock_switch(rq, prev);
> + reload_kvm_vcpu(current);
ok, this looks certainly cheap enough from a scheduler POV, and it
cleans up the whole KVM/scheduling interaction quite nicely. (I'd not
bother with tweaking the migration logic, there's enough incentive for
the scheduler to keep tasks from migrating unnecessarily.)
Ingo
next prev parent reply other threads:[~2007-07-08 13:35 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-08 12:58 Avi Kivity
2007-07-08 13:09 ` Ingo Molnar
2007-07-08 13:16 ` Avi Kivity
2007-07-08 13:36 ` Ingo Molnar
2007-07-08 13:35 ` Ingo Molnar [this message]
2007-07-08 13:41 ` Avi Kivity
2007-07-08 13:48 ` Ingo Molnar
2007-07-08 13:53 ` Avi Kivity
2007-07-08 13:59 ` Ingo Molnar
2007-07-08 15:13 ` Avi Kivity
2007-07-10 11:18 ` Avi Kivity
2007-07-10 11:30 ` Ingo Molnar
2007-07-08 23:32 ` [kvm-devel] " Rusty Russell
2007-07-09 6:39 ` Avi Kivity
2007-07-10 1:09 ` Rusty Russell
2007-07-10 5:53 ` Avi Kivity
2007-07-10 6:47 ` Rusty Russell
2007-07-10 7:19 ` Avi Kivity
2007-07-10 8:01 ` Rusty Russell
2007-07-10 8:24 ` Avi Kivity
2007-07-11 5:50 ` Avi Kivity
2007-07-08 19:07 ` Andi Kleen
2007-07-09 6:41 ` Avi Kivity
2007-07-09 8:50 ` Shaohua Li
2007-07-09 9:46 ` Avi Kivity
2007-07-09 10:21 ` 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=20070708133539.GA12597@elte.hu \
--to=mingo@elte.hu \
--cc=avi@qumranet.com \
--cc=kvm-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=shaohua.li@intel.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®