1. 08 Jan, 2006 1 commit
  2. 13 Nov, 2005 2 commits
    • Zach Brown's avatar
      [PATCH] aio: don't ref kioctx after decref in put_ioctx · 5ef1c49f
      Zach Brown authored
      
      put_ioctx's refcount debugging was doing an atomic_read after dropping its
      reference when it wasn't the last ref, leaving a tiny race for another freeing
      thread to sneak into.  This shifts the debugging before the ops, uses BUG_ON,
      and reformats the defines a little.  Sadly, moving to inlines increased the
      code size but this change decreases the code size by a whole 9 bytes :)
      Signed-off-by: default avatarZach Brown <zach.brown@oracle.com>
      Cc: Benjamin LaHaise <bcrl@kvack.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      5ef1c49f
    • Zach Brown's avatar
      [PATCH] aio: remove kioctx from mm_struct · 20dcae32
      Zach Brown authored
      
      Sync iocbs have a life cycle that don't need a kioctx.  Their retrying, if
      any, is done in the context of their owner who has allocated them on the
      stack.
      
      The sole user of a sync iocb's ctx reference was aio_complete() checking for
      an elevated iocb ref count that could never happen.  No path which grabs an
      iocb ref has access to sync iocbs.
      
      If we were to implement sync iocb cancelation it would be done by the owner of
      the iocb using its on-stack reference.
      
      Removing this chunk from aio_complete allows us to remove the entire kioctx
      instance from mm_struct, reducing its size by a third.  On a i386 testing box
      the slab size went from 768 to 504 bytes and from 5 to 8 per page.
      Signed-off-by: default avatarZach Brown <zach.brown@oracle.com>
      Acked-by: default avatarBenjamin LaHaise <bcrl@kvack.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      20dcae32
  3. 07 Nov, 2005 1 commit
    • Zach Brown's avatar
      [PATCH] aio: remove aio_max_nr accounting race · d55b5fda
      Zach Brown authored
      
      AIO was adding a new context's max requests to the global total before
      testing if that resulting total was over the global limit.  This let
      innocent tasks get their new limit tested along with a racing guilty task
      that was crossing the limit.  This serializes the _nr accounting with a
      spinlock It also switches to using unsigned long for the global totals.
      Individual contexts are still limited to an unsigned int's worth of
      requests by the syscall interface.
      
      The problem and fix were verified with a simple program that spun creating
      and destroying a context while holding on to another long lived context.
      Before the patch a task creating a tiny context could get a spurious EAGAIN
      if it raced with a task creating a very large context that overran the
      limit.
      Signed-off-by: default avatarZach Brown <zach.brown@oracle.com>
      Cc: Benjamin LaHaise <bcrl@kvack.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      d55b5fda
  4. 17 Oct, 2005 1 commit
  5. 30 Sep, 2005 1 commit
    • Zach Brown's avatar
      [PATCH] aio: remove unlocked task_list test and resulting race · 897f15fb
      Zach Brown authored
      
      Only one of the run or kick path is supposed to put an iocb on the run
      list.  If both of them do it than one of them can end up referencing a
      freed iocb.  The kick path could delete the task_list item from the wait
      queue before getting the ctx_lock and putting the iocb on the run list.
      The run path was testing the task_list item outside the lock so that it
      could catch ki_retry methods that return -EIOCBRETRY *without* putting the
      iocb on a wait queue and promising to call kick_iocb.  This unlocked check
      could then race with the kick path to cause both to try and put the iocb on
      the run list.
      
      The patch stops the run path from testing task_list by requring that any
      ki_retry that returns -EIOCBRETRY *must* guarantee that kick_iocb() will be
      called in the future.  aio_p{read,write}, the only in-tree -EIOCBRETRY
      users, are updated.
      Signed-off-by: default avatarZach Brown <zach.brown@oracle.com>
      Signed-off-by: default avatarBenjamin LaHaise <bcrl@linux.intel.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      897f15fb
  6. 16 Apr, 2005 1 commit
    • Linus Torvalds's avatar
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds authored
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4