30 Nov, 2009

1 commit

  • fork() clones all thread_info flags, including
    TIF_USER_RETURN_NOTIFY; if the new task is first scheduled on a cpu
    which doesn't have user return notifiers set, this causes user
    return notifiers to trigger without any way of clearing itself.

    This is easy to trigger with a forky workload on the host in
    parallel with kvm, resulting in a cpu in an endless loop on the
    verge of returning to userspace.

    Fix by dropping the TIF_USER_RETURN_NOTIFY immediately after fork.

    Signed-off-by: Avi Kivity
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Avi Kivity
     

02 Oct, 2009

1 commit

  • Add a general per-cpu notifier that is called whenever the kernel is
    about to return to userspace. The notifier uses a thread_info flag
    and existing checks, so there is no impact on user return or context
    switch fast paths.

    This will be used initially to speed up KVM task switching by lazily
    updating MSRs.

    Signed-off-by: Avi Kivity
    LKML-Reference:
    Signed-off-by: H. Peter Anvin

    Avi Kivity