Skip to content
Snippets Groups Projects
  1. Nov 29, 2009
    • Avi Kivity's avatar
      core: Fix user return notifier on fork() · 8e7cac79
      Avi Kivity authored
      
      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: default avatarAvi Kivity <avi@redhat.com>
      LKML-Reference: <1259505288-16559-1-git-send-email-avi@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      8e7cac79
  2. Nov 01, 2009
    • Stephen Rothwell's avatar
      x86: Fix user return notifier put_cpu_var() invocation · 3c912b6e
      Stephen Rothwell authored
      
      Today's linux-next build (x86_64 allmodconfig) failed like this:
      
        kernel/user-return-notifier.c: In function
        'fire_user_return_notifiers': kernel/user-return-notifier.c:45:
        error: expected expression before ')' token
      
      Introduced by commit 7c68af6e
      ("core, x86: Add user return notifiers") from the tip and kvm trees
      but revealed by commit e0fdb0e0
      ("percpu: add __percpu for sparse") from the percpu tree.
      
      Before that percpu tree commit, "put_cpu_var()" would compile
      without error (even though it really needs a parameter).
      
      Signed-off-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Cc: Avi Kivity <avi@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Christoph Lameter <cl@linux-foundation.org>
      LKML-Reference: <20091102161722.eea4358d.sfr@canb.auug.org.au>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      3c912b6e
  3. Oct 25, 2009
  4. Oct 01, 2009
    • Avi Kivity's avatar
      core, x86: Add user return notifiers · 7c68af6e
      Avi Kivity authored
      
      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: default avatarAvi Kivity <avi@redhat.com>
      LKML-Reference: <1253342422-13811-1-git-send-email-avi@redhat.com>
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      7c68af6e
  5. Sep 30, 2009
Loading