From: Rusty Russell <rusty@rustcorp.com.au>
To: Ingo Molnar <mingo@elte.hu>
Cc: Avi Kivity <avi@qumranet.com>,
kvm-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [kvm-devel] [PATCH][RFC] kvm-scheduler integration
Date: Mon, 09 Jul 2007 09:32:43 +1000 [thread overview]
Message-ID: <1183937563.6005.365.camel@localhost.localdomain> (raw)
In-Reply-To: <20070708134850.GB22911@elte.hu>
On Sun, 2007-07-08 at 15:48 +0200, Ingo Molnar wrote:
> * 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.
> >
> > Won't that increase task_struct (16 bytes on 64-bit) unnecessarily?
> > The function pointers are common to all virtual machines.
>
> well, this function pointer could then be reused by other virtual
> machines as well, couldnt it? If the task struct overhead is a problem
> (it really isnt, and it's dependent on CONFIG_KVM) then we could switch
> it around to a notifier-alike mechanism.
OK, this patch is *ugly*. Not that there's anything wrong with a patch
which says "I'm going to preempt you", but making it kvm-specific is
ugly. ISTR times past where I wanted such a hook, although none spring
immediately into my pre-coffee brain.
I think a "struct preempt_ops *" and a "void *preempt_ops_data" inside
every task struct is a better idea. Call the config option
PREEMPT_SCHED_HOOKS and now there's nothing kvm-specific about it...
Cheers,
Rusty.
WARNING: multiple messages have this Message-ID (diff)
From: Rusty Russell <rusty-8n+1lVoiYb80n/F98K4Iww@public.gmane.org>
To: Ingo Molnar <mingo-X9Un+BFzKDI@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH][RFC] kvm-scheduler integration
Date: Mon, 09 Jul 2007 09:32:43 +1000 [thread overview]
Message-ID: <1183937563.6005.365.camel@localhost.localdomain> (raw)
In-Reply-To: <20070708134850.GB22911-X9Un+BFzKDI@public.gmane.org>
On Sun, 2007-07-08 at 15:48 +0200, Ingo Molnar wrote:
> * Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org> 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.
> >
> > Won't that increase task_struct (16 bytes on 64-bit) unnecessarily?
> > The function pointers are common to all virtual machines.
>
> well, this function pointer could then be reused by other virtual
> machines as well, couldnt it? If the task struct overhead is a problem
> (it really isnt, and it's dependent on CONFIG_KVM) then we could switch
> it around to a notifier-alike mechanism.
OK, this patch is *ugly*. Not that there's anything wrong with a patch
which says "I'm going to preempt you", but making it kvm-specific is
ugly. ISTR times past where I wanted such a hook, although none spring
immediately into my pre-coffee brain.
I think a "struct preempt_ops *" and a "void *preempt_ops_data" inside
every task struct is a better idea. Call the config option
PREEMPT_SCHED_HOOKS and now there's nothing kvm-specific about it...
Cheers,
Rusty.
-------------------------------------------------------------------------
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-07-08 23:33 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-08 12:58 [PATCH][RFC] kvm-scheduler integration Avi Kivity
2007-07-08 12:58 ` Avi Kivity
2007-07-08 13:09 ` Ingo Molnar
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
2007-07-08 13:35 ` Ingo Molnar
2007-07-08 13:41 ` Avi Kivity
2007-07-08 13:41 ` Avi Kivity
2007-07-08 13:48 ` Ingo Molnar
2007-07-08 13:48 ` Ingo Molnar
2007-07-08 13:53 ` Avi Kivity
2007-07-08 13:53 ` Avi Kivity
2007-07-08 13:59 ` Ingo Molnar
2007-07-08 13:59 ` Ingo Molnar
2007-07-08 15:13 ` Avi Kivity
2007-07-08 15:13 ` Avi Kivity
2007-07-10 11:18 ` Avi Kivity
2007-07-10 11:18 ` Avi Kivity
2007-07-10 11:30 ` Ingo Molnar
2007-07-10 11:30 ` Ingo Molnar
2007-07-08 23:32 ` Rusty Russell [this message]
2007-07-08 23:32 ` Rusty Russell
2007-07-09 6:39 ` [kvm-devel] " Avi Kivity
2007-07-09 6:39 ` Avi Kivity
2007-07-10 1:09 ` [kvm-devel] " Rusty Russell
2007-07-10 1:09 ` Rusty Russell
2007-07-10 5:53 ` [kvm-devel] " Avi Kivity
2007-07-10 5:53 ` Avi Kivity
2007-07-10 6:47 ` [kvm-devel] " Rusty Russell
2007-07-10 6:47 ` Rusty Russell
2007-07-10 7:19 ` [kvm-devel] " Avi Kivity
2007-07-10 7:19 ` Avi Kivity
2007-07-10 8:01 ` [kvm-devel] " Rusty Russell
2007-07-10 8:01 ` Rusty Russell
2007-07-10 8:24 ` [kvm-devel] " Avi Kivity
2007-07-10 8:24 ` Avi Kivity
2007-07-11 5:50 ` [kvm-devel] " 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 6:41 ` Avi Kivity
2007-07-09 8:50 ` Shaohua Li
2007-07-09 8:50 ` Shaohua Li
2007-07-09 9:46 ` Avi Kivity
2007-07-09 9:46 ` Avi Kivity
2007-07-09 10:21 ` 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=1183937563.6005.365.camel@localhost.localdomain \
--to=rusty@rustcorp.com.au \
--cc=avi@qumranet.com \
--cc=kvm-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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.