[lkml]   [2007]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [kvm-devel] [PATCH][RFC] kvm-scheduler integration
On Tue, 2007-07-10 at 08:53 +0300, Avi Kivity wrote:
> Rusty Russell wrote:
> > No; this is a "I'm doing something magic and need to know before someone
> > else takes the CPU". Almost by definition, you cannot have two of them
> > at the same time. Let someone else try that if and when...
> Why can't you have two of them? Say I'm writing a module to utilize
> branch recording to be able to debug a process in reverse (of course
> that doesn't really need sched hooks; let's pretend it does). Why can't
> I debug a process that uses kvm?
> More importantly, now the two subsystems have to know about each other
> so they don't step on each other's toes.

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.

> > But KVM-specific code in the scheduler is just wrong, and I think we all
> > know that.
> Even if I eradicate all mention of kvm from the patch, it's still kvm
> specific. kvm at least is sensitive to the exact point where we switch
> in (it wants interrupts enabled) and it expects certain parameters to
> the callbacks. If $new_abuser needs other conditions or parameters,
> which is quite likely IMO as it will most likely have to do with
> hardware, then we will need to update the hooks anyway.

If it's not general, then this whole approach is wrong: put it in
arch/*/kernel/process.c:__switch_to and finish_arch_switch. The
congruent case which comes to mind is lazy FPU handling.

Which brings us to the question: why do you want interrupts enabled?


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2007-07-10 08:51    [W:0.096 / U:4.008 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site