1. 13 9月, 2006 1 次提交
  2. 12 9月, 2006 2 次提交
    • S
      [GFS2] Use hlist for glock hash chains · b6397893
      Steven Whitehouse 提交于
      This results in smaller list heads, so that we can have more chains
      in the same amount of memory (twice as many). I've multiplied the
      size of the table by four though - this is because we are saving
      memory by not having one lock per chain any more. So we land up
      using about the same amount of memory for the hash table as we
      did before I started these changes, the difference being that we
      now have four times as many hash chains.
      
      The reason that I say "about the same amount of memory" is that the
      actual amount now depends upon the NR_CPUS and some of the config
      variables, so that its not exact and in some cases we do use more
      memory. Eventually we might want to scale the hash table size
      according to the size of physical ram as measured on module load.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      b6397893
    • S
      [GFS2] Rewrite of examine_bucket() · 24264434
      Steven Whitehouse 提交于
      The existing implementation of this function in glock.c was not
      very efficient as it relied upon keeping a cursor element upon the
      hash chain in question and moving it along. This new version improves
      upon this by using the current element as a cursor. This is possible
      since we only look at the "next" element in the list after we've
      taken the read_lock() subsequent to calling the examiner function.
      Obviously we have to eventually drop the ref count that we are then
      left with and we cannot do that while holding the read_lock, so we
      do that next time we drop the lock. That means either just before
      we examine another glock, or when the loop has terminated.
      
      The new implementation has several advantages: it uses only a
      read_lock() rather than a write_lock(), so it can run simnultaneously
      with other code, it doesn't need a "plug" element, so that it removes
      a test not only from this list iterator, but from all the other glock
      list iterators too. So it makes things faster and smaller.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      24264434
  3. 10 9月, 2006 3 次提交
  4. 09 9月, 2006 1 次提交
    • S
      [GFS2] Move rwlocks in glock.c into their own array · 37b2fa6a
      Steven Whitehouse 提交于
      This splits the rwlocks guarding the hash chains of the glock hash
      table into their own array. This will reduce memory usage in some
      cases due to better alignment, although the real reason for doing it
      is to allow the two tables to be different sizes in future (i.e.
      the locks will be sized proportionally with the max number of CPUs
      and the hash chains sized proportinally with the size of physical memory)
      
      In order to allow this, the gl_bucket member of struct gfs2_glock has
      now become gl_hash, so we record the hash rather than a pointer to the
      bucket itself.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      37b2fa6a
  5. 08 9月, 2006 4 次提交
  6. 05 9月, 2006 2 次提交
  7. 04 9月, 2006 1 次提交
  8. 01 9月, 2006 1 次提交
    • S
      [GFS2] Update copyright, tidy up incore.h · e9fc2aa0
      Steven Whitehouse 提交于
      As per comments from Jan Engelhardt <jengelh@linux01.gwdg.de> this
      updates the copyright message to say "version" in full rather than
      "v.2". Also incore.h has been updated to remove forward structure
      declarations which are not required.
      
      The gfs2_quota_lvb structure has now had endianess annotations added
      to it. Also quota.c has been updated so that we now store the
      lvb data locally in endian independant format to avoid needing
      a structure in host endianess too. As a result the endianess
      conversions are done as required at various points and thus the
      conversion routines in lvb.[ch] are no longer required. I've
      moved the one remaining constant in lvb.h thats used into lm.h
      and removed the unused lvb.[ch].
      
      I have not changed the HIF_ constants. That is left to a later patch
      which I hope will unify the gh_flags and gh_iflags fields of the
      struct gfs2_holder.
      
      Cc: Jan Engelhardt <jengelh@linux01.gwdg.de>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      e9fc2aa0
  9. 31 8月, 2006 1 次提交
  10. 30 8月, 2006 4 次提交
  11. 26 8月, 2006 1 次提交
  12. 25 8月, 2006 1 次提交
    • S
      [GFS2] Speed up scanning of glocks · a2242db0
      Steven Whitehouse 提交于
      I noticed the gfs2_scand seemed to be taking a lot of CPU,
      so in order to cut that down a bit, here is a patch. Firstly
      the type of a glock is a constant during its lifetime, so that
      its possible to check this without needing locking. I've moved
      the (common) case of testing for an inode glock outside of
      the glmutex lock.
      
      Also there was a mutex left over from when the glock cache was
      master of the inode cache. That isn't required any more so I've
      removed that too.
      
      There is probably scope for further speed ups in the future
      in this area.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      a2242db0
  13. 11 8月, 2006 1 次提交
  14. 29 7月, 2006 1 次提交
  15. 28 7月, 2006 1 次提交
    • S
      [GFS2] Use a bio to read the superblock · f45b7ddd
      Steven Whitehouse 提交于
      This means that we don't need to create a special inode just to contain
      a struct address_space in order to read a single disk block. Instead
      we read the disk block directly. Its slightly faster, and uses slightly
      less memory, but the real reason for doing this is that it removes a
      special case from the glock code.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      f45b7ddd
  16. 07 7月, 2006 1 次提交
  17. 06 7月, 2006 1 次提交
  18. 25 6月, 2006 1 次提交
  19. 15 6月, 2006 1 次提交
    • S
      [GFS2] Fix unlinked file handling · feaa7bba
      Steven Whitehouse 提交于
      This patch fixes the way we have been dealing with unlinked,
      but still open files. It removes all limits (other than memory
      for inodes, as per every other filesystem) on numbers of these
      which we can support on GFS2. It also means that (like other
      fs) its the responsibility of the last process to close the file
      to deallocate the storage, rather than the person who did the
      unlinking. Note that with GFS2, those two events might take place
      on different nodes.
      
      Also there are a number of other changes:
      
       o We use the Linux inode subsystem as it was intended to be
      used, wrt allocating GFS2 inodes
       o The Linux inode cache is now the point which we use for
      local enforcement of only holding one copy of the inode in
      core at once (previous to this we used the glock layer).
       o We no longer use the unlinked "special" file. We just ignore it
      completely. This makes unlinking more efficient.
       o We now use the 4th block allocation state. The previously unused
      state is used to track unlinked but still open inodes.
       o gfs2_inoded is no longer needed
       o Several fields are now no longer needed (and removed) from the in
      core struct gfs2_inode
       o Several fields are no longer needed (and removed) from the in core
      superblock
      
      There are a number of future possible optimisations and clean ups
      which have been made possible by this patch.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      feaa7bba
  20. 24 5月, 2006 1 次提交
  21. 19 5月, 2006 3 次提交
  22. 06 5月, 2006 1 次提交
    • S
      [GFS2] Readpages support · fd88de56
      Steven Whitehouse 提交于
      This adds readpages support (and also corrects a small bug in
      the readpage error path at the same time). Hopefully this will
      improve performance by allowing GFS to submit larger lumps of
      I/O at a time.
      
      In order to simplify the setting of BH_Boundary, it currently gets
      set when we hit the end of a indirect pointer block. There is
      always a boundary at this point with the current allocation code.
      It doesn't get all the boundaries right though, so there is still
      room for improvement in this.
      
      See comments in fs/gfs2/ops_address.c for further information about
      readpages with GFS2.
      
      Signed-off-by: Steven Whitehouse
      fd88de56
  23. 28 4月, 2006 3 次提交
    • S
      [GFS2] Remove some unused code · 56409abb
      Steven Whitehouse 提交于
      Remove some of the unused code flagged up by Adrian Bunk.
      
      Cc: Adrian Bunk <bunk@stusta.de>
      Signed-off-by: Steven Whitehouse
      56409abb
    • A
      [GFS2] [-mm patch] fs/gfs2/: possible cleanups · 08bc2dbc
      Adrian Bunk 提交于
      This patch contains the following possible cleanups:
      - make needlessly global code static
      - #if 0 unused functions
      - remove the following global function that was both unused and
        unimplemented:
        - super.c: gfs2_do_upgrade()
      Signed-off-by: NAdrian Bunk <bunk@stusta.de>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      08bc2dbc
    • S
      [GFS2] Reordering in deallocation to avoid recursive locking · 36327521
      Steven Whitehouse 提交于
      Despite my earlier careful search, there was a recursive lock left
      in the deallocation code. This removes it. It also should speed up
      deallocation be reducing the number of locking operations which take
      place by using two "try lock" operations on the two locks involved in
      inode deallocation which allows us to grab the locks out of order
      (compared with NFS which grabs the inode lock first and the iopen
      lock later). It is ok for us to fail while doing this since if it
      does fail it means that someone else is still using the inode and
      thus it wouldn't be possible to deallocate anyway.
      
      This fixes the bug reported to me by Rob Kenna.
      
      Cc: Rob Kenna <rkenna@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      36327521
  24. 27 4月, 2006 3 次提交