Re: [PATCH RFC 1/2] kvm: Handle undercommitted guest case in PLEhandler

From: Avi Kivity
Date: Mon Sep 24 2012 - 12:26:02 EST


On 09/24/2012 06:14 PM, Peter Zijlstra wrote:
> On Mon, 2012-09-24 at 18:06 +0200, Avi Kivity wrote:
>>
>> We would probably need a ->sched_exit() preempt notifier to make this
>> work. Peter, I know how much you love those, would it be acceptable?
>
> Where exactly do you want this? TASK_DEAD? or another exit?

TASK_DEAD of the task that registered the preempt notifier.

The idea is that I want to hold on to the notifier even when exiting to
userspace. Since userspace is under no obligation to call kvm again, I
need a chance to unregister the notifier and otherwise clean up.

Eh, looking at the code, we'll have a ->sched_out() after the state is
set to TASK_DEAD. So all we need to do is examine the state. We'll
need to examine the state anyway to see if we were preempted or blocking.

--
error compiling committee.c: too many arguments to function
--
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/