1. 28 Apr, 2016 1 commit
    • Ingo Molnar's avatar
      mm/mmu_context, sched/core: Fix mmu_context.h assumption · 8efd755a
      Ingo Molnar authored
      
      Some architectures (such as Alpha) rely on include/linux/sched.h definitions
      in their mmu_context.h files.
      
      So include sched.h before mmu_context.h.
      
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: linux-kernel@vger.kernel.org
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      8efd755a
  2. 21 Feb, 2014 1 commit
  3. 08 May, 2013 1 commit
    • Zach Brown's avatar
      mm: remove old aio use_mm() comment · 697f4d68
      Zach Brown authored
      
      Bunch of performance improvements and cleanups Zach Brown and I have
      been working on.  The code should be pretty solid at this point, though
      it could of course use more review and testing.
      
      The results in my testing are pretty impressive, particularly when an
      ioctx is being shared between multiple threads.  In my crappy synthetic
      benchmark, with 4 threads submitting and one thread reaping completions,
      I saw overhead in the aio code go from ~50% (mostly ioctx lock
      contention) to low single digits.  Performance with ioctx per thread
      improved too, but I'd have to rerun those benchmarks.
      
      The reason I've been focused on performance when the ioctx is shared is
      that for a fair number of real world completions, userspace needs the
      completions aggregated somehow - in practice people just end up
      implementing this aggregation in userspace today, but if it's done right
      we can do it much more efficiently in the kernel.
      
      Performance wise, the end result of this patch series is that submitting
      a kiocb writes to _no_ shared cachelines - the penalty for sharing an
      ioctx is gone there.  There's still going to be some cacheline
      contention when we deliver the completions to the aio ringbuffer (at
      least if you have interrupts being delivered on multiple cores, which
      for high end stuff you do) but I have a couple more patches not in this
      series that implement coalescing for that (by taking advantage of
      interrupt coalescing).  With that, there's basically no bottlenecks or
      performance issues to speak of in the aio code.
      
      This patch:
      
      use_mm() is used in more places than just aio.  There's no need to mention
      callers when describing the function.
      Signed-off-by: default avatarZach Brown <zab@redhat.com>
      Signed-off-by: default avatarKent Overstreet <koverstreet@google.com>
      Cc: Felipe Balbi <balbi@ti.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Mark Fasheh <mfasheh@suse.com>
      Cc: Joel Becker <jlbec@evilplan.org>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Asai Thambi S P <asamymuthupa@micron.com>
      Cc: Selvan Mani <smani@micron.com>
      Cc: Sam Bradshaw <sbradshaw@micron.com>
      Acked-by: default avatarJeff Moyer <jmoyer@redhat.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Benjamin LaHaise <bcrl@kvack.org>
      Reviewed-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      697f4d68
  4. 22 Mar, 2012 1 commit
  5. 31 Oct, 2011 1 commit
  6. 24 Mar, 2010 1 commit
    • Michael S. Tsirkin's avatar
      exit: fix oops in sync_mm_rss · 298359c5
      Michael S. Tsirkin authored
      In 2.6.34-rc1, removing vhost_net module causes an oops in sync_mm_rss
      (called from do_exit) when workqueue is destroyed.  This does not happen
      on net-next, or with vhost on top of to 2.6.33.
      
      The issue seems to be introduced by
      34e55232 ("mm: avoid false sharing of
      mm_counter) which added sync_mm_rss() that is passed task->mm, and
      dereferences it without checking.  If task is a kernel thread, mm might be
      NULL.  I think this might also happen e.g.  with aio.
      
      This patch fixes the oops by calling sync_mm_rss when task->mm is set to
      NULL.  I also added BUG_ON to detect any other cases where counters get
      incremented while mm is NULL.
      
      The oops I observed looks like this:
      
      BUG: unable to handle kernel NULL pointer dereference at 00000000000002a8
      IP: [<ffffffff810b436d>] sync_mm_rss+0x33/0x6f
      PGD 0
      Oops: 0002 [#1] SMP
      last sysfs file: /sys/devices/system/cpu/cpu7/cache/index2/shared_cpu_map
      CPU 2
      Modules linked in: vhost_net(-) tun bridge stp sunrpc...
      298359c5
  7. 15 Jan, 2010 1 commit
  8. 22 Sep, 2009 2 commits