public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: Rusty Russell <rusty-8n+1lVoiYb80n/F98K4Iww@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: Tue, 10 Jul 2007 11:24:18 +0300	[thread overview]
Message-ID: <46934232.2070509@qumranet.com> (raw)
In-Reply-To: <1184054478.6005.555.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>

Rusty Russell wrote:
> On Tue, 2007-07-10 at 10:19 +0300, Avi Kivity wrote:
>   
>> Rusty Russell wrote:
>>     
>>> Exactly, if we have two at the same time, they need to know about each
>>> other.  Providing infrastructure which lets them avoid thinking about it
>>> is the wrong direction.
>>>   
>>>       
>> With a kvm-specific hook, they can't stop on each other (there can only 
>> be one).
>> With a list, they don't stomp on each other.
>> With a struct preempt_ops but no list, as you propose, they can and will 
>> stomp on each other.
>>     
>
> I'm not talking about the actual overwriting of someone else's hook.
> I'm talking about semantic conflicts involving the actual CPU state.
>
> If I'm lazily restoring some CPU state because I know I don't use it,
> and you're lazily restoring some CPU state because you don't use it, we
> need to make sure that state doesn't intersect: ie. we need to be aware
> of each other.  Only providing a single hook per task forces the second
> user to think about it (maybe that lazy state saving needs to be
> extracted into common code).
>   

Well, if there's another user of VT instructions, then we certainly need 
to have something central to coordinate it.  No API can prevent this, at 
some point we'll forced to use common sense.

>> I guess I can put it in arch specific code, but that means both i386 and 
>> x86_64.
>>
>> Once we have another user we can try to generalize it.
>>     
>
> The problem is that the arch hooks are in the wrong place: 
>
>   

Yes.

>>> Which brings us to the question: why do you want interrupts enabled?
>>>       
>> The sched in hook (vcpu_load) sometimes needs to issue an IPI in order 
>> to flush the VT registers from another cpu into memory.
>>     
>
> OK, I'll have to go away and read the code for this.
>
> BTW, I have no problem with #ifdef KVM-style code in arch-specifics.
> It's kernel/sched.c which is jarring...
>   

We don't want you jarred, do we? I'll prepare a non-kvm-specific patch 
for review later on.  But I can't bring myself to do a single generic 
hook (it's impossible to use correctly); it will be an hlist-based thing.

-- 
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
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/

  parent reply	other threads:[~2007-07-10  8:24 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-08 12:58 [PATCH][RFC] kvm-scheduler integration Avi Kivity
     [not found] ` <11838994974161-git-send-email-avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
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
     [not found]     ` <20070708133539.GA12597-X9Un+BFzKDI@public.gmane.org>
2007-07-08 13:41       ` Avi Kivity
     [not found]         ` <4690E973.7000606-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-07-08 13:48           ` Ingo Molnar
     [not found]             ` <20070708134850.GB22911-X9Un+BFzKDI@public.gmane.org>
2007-07-08 13:53               ` Avi Kivity
     [not found]                 ` <4690EC47.6060904-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-07-08 13:59                   ` Ingo Molnar
     [not found]                     ` <20070708135905.GA24991-X9Un+BFzKDI@public.gmane.org>
2007-07-08 15:13                       ` Avi Kivity
2007-07-10 11:18                       ` Avi Kivity
     [not found]                         ` <46936AF2.9010400-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-07-10 11:30                           ` Ingo Molnar
2007-07-08 23:32               ` Rusty Russell
     [not found]                 ` <1183937563.6005.365.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2007-07-09  6:39                   ` Avi Kivity
     [not found]                     ` <4691D82F.3030401-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-07-10  1:09                       ` Rusty Russell
     [not found]                         ` <1184029745.6005.402.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2007-07-10  5:53                           ` Avi Kivity
     [not found]                             ` <46931ECB.2060601-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-07-10  6:47                               ` Rusty Russell
     [not found]                                 ` <1184050055.6005.523.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2007-07-10  7:19                                   ` Avi Kivity
     [not found]                                     ` <469332F3.1000808-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-07-10  8:01                                       ` Rusty Russell
     [not found]                                         ` <1184054478.6005.555.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2007-07-10  8:24                                           ` Avi Kivity [this message]
2007-07-11  5:50                                       ` Avi Kivity
2007-07-09  8:50   ` Shaohua Li
     [not found]     ` <1183971001.4254.3.camel-yAZKuqJtXNMXR+D7ky4Foa2pdiUAq4bhAL8bYrjMMd8@public.gmane.org>
2007-07-09  9:46       ` Avi Kivity
     [not found]         ` <469203E9.7000109-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-07-09 10:21           ` Avi Kivity
     [not found] ` <p73ir8uzpcx.fsf@bingen.suse.de>
     [not found]   ` <p73ir8uzpcx.fsf-KvMlXPVkKihbpigZmTR7Iw@public.gmane.org>
2007-07-09  6: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=46934232.2070509@qumranet.com \
    --to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=rusty-8n+1lVoiYb80n/F98K4Iww@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