1. 01 12月, 2008 1 次提交
  2. 17 11月, 2008 1 次提交
    • D
      [XFS] Fix double free of log tickets · cc09c0dc
      Dave Chinner 提交于
      When an I/O error occurs during an intermediate commit on a rolling
      transaction, xfs_trans_commit() will free the transaction structure
      and the related ticket. However, the duplicate transaction that
      gets used as the transaction continues still contains a pointer
      to the ticket. Hence when the duplicate transaction is cancelled
      and freed, we free the ticket a second time.
      
      Add reference counting to the ticket so that we hold an extra
      reference to the ticket over the transaction commit. We drop the
      extra reference once we have checked that the transaction commit
      did not return an error, thus avoiding a double free on commit
      error.
      
      Credit to Nick Piggin for tripping over the problem.
      
      SGI-PV: 989741
      Signed-off-by: NDave Chinner <david@fromorbit.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NLachlan McIlroy <lachlan@sgi.com>
      cc09c0dc
  3. 30 10月, 2008 1 次提交
  4. 17 9月, 2008 1 次提交
    • L
      [XFS] Move memory allocations for log tracing out of the critical path · 31bd61f2
      Lachlan McIlroy 提交于
      Memory allocations for log->l_grant_trace and iclog->ic_trace are done on
      demand when the first event is logged. In xlog_state_get_iclog_space() we
      call xlog_trace_iclog() under a spinlock and allocating memory here can
      cause us to sleep with a spinlock held and deadlock the system.
      
      For the log grant tracing we use KM_NOSLEEP but that means we can lose
      trace entries. Since there is no locking to serialize the log grant
      tracing we could race and have multiple allocations and leak memory.
      
      So move the allocations to where we initialize the log/iclog structures.
      Use KM_NOFS to avoid recursing into the filesystem and drop log->l_trace
      since it's not even used.
      
      SGI-PV: 983738
      
      SGI-Modid: xfs-linux-melb:xfs-kern:31896a
      Signed-off-by: NLachlan McIlroy <lachlan@sgi.com>
      Signed-off-by: NChristoph Hellwig <hch@infradead.org>
      31bd61f2
  5. 13 8月, 2008 2 次提交
  6. 28 7月, 2008 1 次提交
  7. 18 4月, 2008 4 次提交
    • D
      [XFS] Reorganise xlog_t for better cacheline isolation of contention · 4679b2d3
      David Chinner 提交于
      To reduce contention on the log in large CPU count, separate out different
      parts of the xlog_t structure onto different cachelines. Move each lock
      onto a different cacheline along with all the members that are
      accessed/modified while that lock is held.
      
      Also, move the debugging code into debug code.
      
      SGI-PV: 978729
      SGI-Modid: xfs-linux-melb:xfs-kern:30772a
      Signed-off-by: NDavid Chinner <dgc@sgi.com>
      Signed-off-by: NLachlan McIlroy <lachlan@sgi.com>
      4679b2d3
    • D
      [XFS] Remove the xlog_ticket allocator · eb01c9cd
      David Chinner 提交于
      The ticket allocator is just a simple slab implementation internal to the
      log. It requires the icloglock to be held when manipulating it and this
      contributes to contention on that lock.
      
      Just kill the entire allocator and use a memory zone instead. While there,
      allow us to gracefully fail allocation with ENOMEM.
      
      SGI-PV: 978729
      SGI-Modid: xfs-linux-melb:xfs-kern:30771a
      Signed-off-by: NDavid Chinner <dgc@sgi.com>
      Signed-off-by: NChristoph Hellwig <hch@infradead.org>
      Signed-off-by: NLachlan McIlroy <lachlan@sgi.com>
      eb01c9cd
    • D
      [XFS] Per iclog callback chain lock · 114d23aa
      David Chinner 提交于
      Rather than use the icloglock for protecting the iclog completion callback
      chain, use a new per-iclog lock so that walking the callback chain doesn't
      require holding a global lock.
      
      This reduces contention on the icloglock during transaction commit and log
      I/O completion by reducing the number of times we need to hold the global
      icloglock during these operations.
      
      SGI-PV: 978729
      SGI-Modid: xfs-linux-melb:xfs-kern:30770a
      Signed-off-by: NDavid Chinner <dgc@sgi.com>
      Signed-off-by: NChristoph Hellwig <hch@infradead.org>
      Signed-off-by: NLachlan McIlroy <lachlan@sgi.com>
      114d23aa
    • D
      [XFS] Use atomics for iclog reference counting · 155cc6b7
      David Chinner 提交于
      Now that we update the log tail LSN less frequently on transaction
      completion, we pass the contention straight to the global log state lock
      (l_iclog_lock) during transaction completion.
      
      We currently have to take this lock to decrement the iclog reference
      count. there is a reference count on each iclog, so we need to take þhe
      global lock for all refcount changes.
      
      When large numbers of processes are all doing small trnasctions, the iclog
      reference counts will be quite high, and the state change that absolutely
      requires the l_iclog_lock is the except rather than the norm.
      
      Change the reference counting on the iclogs to use atomic_inc/dec so that
      we can use atomic_dec_and_lock during transaction completion and avoid the
      need for grabbing the l_iclog_lock for every reference count decrement
      except the one that matters - the last.
      
      SGI-PV: 975671
      SGI-Modid: xfs-linux-melb:xfs-kern:30505a
      Signed-off-by: NDavid Chinner <dgc@sgi.com>
      Signed-off-by: NTim Shimmin <tes@sgi.com>
      Signed-off-by: NLachlan McIlroy <lachlan@sgi.com>
      155cc6b7
  8. 10 4月, 2008 1 次提交
  9. 07 2月, 2008 5 次提交
    • C
      [XFS] xlog_rec_header/xlog_rec_ext_header endianess annotations · b53e675d
      Christoph Hellwig 提交于
      Mostly trivial conversion with one exceptions: h_num_logops was kept in
      native endian previously and only converted to big endian in xlog_sync,
      but we always keep it big endian now. With todays cpus fast byteswap
      instructions that's not an issue but the new variant keeps the code clean
      and maintainable.
      
      SGI-PV: 971186
      SGI-Modid: xfs-linux-melb:xfs-kern:29821a
      Signed-off-by: NChristoph Hellwig <hch@infradead.org>
      Signed-off-by: NLachlan McIlroy <lachlan@sgi.com>
      Signed-off-by: NTim Shimmin <tes@sgi.com>
      b53e675d
    • C
      [XFS] clean up some xfs_log_priv.h macros · 67fcb7bf
      Christoph Hellwig 提交于
      - the various assign lsn macros are replaced by a single inline,
      xlog_assign_lsn, which is equivalent to ASSIGN_ANY_LSN_HOST except
      for a more sane calling convention. ASSIGN_LSN_DISK is replaced
      by xlog_assign_lsn and a manual bytespap, and ASSIGN_LSN by the same,
      except we pass the cycle and block arguments explicitly instead of a
      log paramter. The latter two variants only had 2, respectively one
      user anyway.
      - the GET_CYCLE is replaced by a xlog_get_cycle inline with exactly the
      same calling conventions.
      - GET_CLIENT_ID is replaced by xlog_get_client_id which leaves away
      the unused arch argument. Instead of conditional defintions
      depending on host endianess we now do an unconditional swap and shift
      then, which generates equal code.
      - the unused XLOG_SET macro is removed.
      
      SGI-PV: 971186
      SGI-Modid: xfs-linux-melb:xfs-kern:29820a
      Signed-off-by: NChristoph Hellwig <hch@infradead.org>
      Signed-off-by: NLachlan McIlroy <lachlan@sgi.com>
      Signed-off-by: NTim Shimmin <tes@sgi.com>
      67fcb7bf
    • C
      [XFS] clean up some xfs_log_priv.h macros · 03bea6fe
      Christoph Hellwig 提交于
      - the various assign lsn macros are replaced by a single inline,
      xlog_assign_lsn, which is equivalent to ASSIGN_ANY_LSN_HOST except
      for a more sane calling convention. ASSIGN_LSN_DISK is replaced
      by xlog_assign_lsn and a manual bytespap, and ASSIGN_LSN by the same,
      except we pass the cycle and block arguments explicitly instead of a
      log paramter. The latter two variants only had 2, respectively one
      user anyway.
      - the GET_CYCLE is replaced by a xlog_get_cycle inline with exactly the
      same calling conventions.
      - GET_CLIENT_ID is replaced by xlog_get_client_id which leaves away
      the unused arch argument. Instead of conditional defintions
      depending on host endianess we now do an unconditional swap and shift
      then, which generates equal code.
      - the unused XLOG_SET macro is removed.
      
      SGI-PV: 971186
      SGI-Modid: xfs-linux-melb:xfs-kern:29819a
      Signed-off-by: NChristoph Hellwig <hch@infradead.org>
      Signed-off-by: NLachlan McIlroy <lachlan@sgi.com>
      Signed-off-by: NTim Shimmin <tes@sgi.com>
      03bea6fe
    • E
      [XFS] Unwrap GRANT_LOCK. · c8b5ea28
      Eric Sandeen 提交于
      Un-obfuscate GRANT_LOCK, remove GRANT_LOCK->mutex_lock->spin_lock macros,
      call spin_lock directly, remove extraneous cookie holdover from old xfs
      code, and change lock type to spinlock_t.
      
      SGI-PV: 970382
      SGI-Modid: xfs-linux-melb:xfs-kern:29741a
      Signed-off-by: NEric Sandeen <sandeen@sandeen.net>
      Signed-off-by: NDonald Douwsma <donaldd@sgi.com>
      Signed-off-by: NTim Shimmin <tes@sgi.com>
      c8b5ea28
    • E
      [XFS] Unwrap LOG_LOCK. · b22cd72c
      Eric Sandeen 提交于
      Un-obfuscate LOG_LOCK, remove LOG_LOCK->mutex_lock->spin_lock macros, call
      spin_lock directly, remove extraneous cookie holdover from old xfs code,
      and change lock type to spinlock_t.
      
      SGI-PV: 970382
      SGI-Modid: xfs-linux-melb:xfs-kern:29740a
      Signed-off-by: NEric Sandeen <sandeen@sandeen.net>
      Signed-off-by: NDonald Douwsma <donaldd@sgi.com>
      Signed-off-by: NTim Shimmin <tes@sgi.com>
      b22cd72c
  10. 16 10月, 2007 1 次提交
  11. 15 10月, 2007 2 次提交
  12. 28 9月, 2006 2 次提交
  13. 11 1月, 2006 3 次提交
  14. 25 11月, 2005 1 次提交
  15. 02 11月, 2005 3 次提交
  16. 08 9月, 2005 1 次提交
  17. 02 9月, 2005 1 次提交
  18. 21 6月, 2005 1 次提交
  19. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      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