Re: [PATCH] Allow preemption during lazy mmu updates

From: Peter Zijlstra
Date: Sun Apr 19 2009 - 06:50:28 EST


On Sun, 2009-04-19 at 13:15 +0300, Avi Kivity wrote:
> Peter Zijlstra wrote:
> > On Wed, 2009-04-08 at 16:54 +0200, Ingo Molnar wrote:
> >
> >>> kernel/sched.c | 2 -
> >>>
> >> Needs the ack of ... oh, never mind - this one is fine i guess ;-)
> >>
> >
> > Ah, about that. This new preemption hook has slightly different
> > requirements than the current preempt-notifiers have (hence the new
> > hook), I was wondering if KVM (afaik currently the only preempt-notifier
> > consumer) could live with these requirements.
> >
> > That is, could these be merged?
> >
>
> What are the slight differences in requirements?
>
> KVM wants to run in non-preemptible, interrupts-enabled context.

The fire_sched_out bit is a little earlier, but I don't think that is a
particularly worrysome, but the most important difference was that
fire_sched_in in far too late. arch_end_context_switch() is done right
in the middle of switch_to() because it needs the TS bit or somesuch.

I'll let Jeremy explain details, as I've long since forgotten them :-)

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/