1. 20 8月, 2021 2 次提交
    • D
      xfs: convert xfs_sb_version_has checks to use mount features · ebd9027d
      Dave Chinner 提交于
      This is a conversion of the remaining xfs_sb_version_has..(sbp)
      checks to use xfs_has_..(mp) feature checks.
      
      This was largely done with a vim replacement macro that did:
      
      :0,$s/xfs_sb_version_has\(.*\)&\(.*\)->m_sb/xfs_has_\1\2/g<CR>
      
      A couple of other variants were also used, and the rest touched up
      by hand.
      
      $ size -t fs/xfs/built-in.a
      	   text    data     bss     dec     hex filename
      before	1127533  311352     484 1439369  15f689 (TOTALS)
      after	1125360  311352     484 1437196  15ee0c (TOTALS)
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Reviewed-by: NDarrick J. Wong <djwong@kernel.org>
      Signed-off-by: NDarrick J. Wong <djwong@kernel.org>
      ebd9027d
    • D
      xfs: replace xfs_sb_version checks with feature flag checks · 38c26bfd
      Dave Chinner 提交于
      Convert the xfs_sb_version_hasfoo() to checks against
      mp->m_features. Checks of the superblock itself during disk
      operations (e.g. in the read/write verifiers and the to/from disk
      formatters) are not converted - they operate purely on the
      superblock state. Everything else should use the mount features.
      
      Large parts of this conversion were done with sed with commands like
      this:
      
      for f in `git grep -l xfs_sb_version_has fs/xfs/*.c`; do
      	sed -i -e 's/xfs_sb_version_has\(.*\)(&\(.*\)->m_sb)/xfs_has_\1(\2)/' $f
      done
      
      With manual cleanups for things like "xfs_has_extflgbit" and other
      little inconsistencies in naming.
      
      The result is ia lot less typing to check features and an XFS binary
      size reduced by a bit over 3kB:
      
      $ size -t fs/xfs/built-in.a
      	text	   data	    bss	    dec	    hex	filenam
      before	1130866  311352     484 1442702  16038e (TOTALS)
      after	1127727  311352     484 1439563  15f74b (TOTALS)
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NDarrick J. Wong <djwong@kernel.org>
      Signed-off-by: NDarrick J. Wong <djwong@kernel.org>
      38c26bfd
  2. 08 4月, 2021 1 次提交
  3. 26 3月, 2021 1 次提交
    • D
      xfs: reduce debug overhead of dir leaf/node checks · 1fea323f
      Dave Chinner 提交于
      On debug kernels, we call xfs_dir3_leaf_check_int() multiple times
      on every directory modification. The robust hash ordering checks it
      does on every entry in the leaf on every call results in a massive
      CPU overhead which slows down debug kernels by a large amount.
      
      We use xfs_dir3_leaf_check_int() for the verifiers as well, so we
      can't just gut the function to reduce overhead. What we can do,
      however, is reduce the work it does when it is called from the
      debug interfaces, just leaving the high level checks in place and
      leaving the robust validation to the verifiers. This means the debug
      checks will catch gross errors, but subtle bugs might not be caught
      until a verifier is run.
      
      It is easy enough to restore the existing debug behaviour if the
      developer needs it (just change a call parameter in the debug code),
      but overwise the overhead makes testing large directory block sizes
      on debug kernels very slow.
      
      Profile at an unlink rate of ~80k file/s on a 64k block size
      filesystem before the patch:
      
        40.30%  [kernel]  [k] xfs_dir3_leaf_check_int
        10.98%  [kernel]  [k] __xfs_dir3_data_check
         8.10%  [kernel]  [k] xfs_verify_dir_ino
         4.42%  [kernel]  [k] memcpy
         2.22%  [kernel]  [k] xfs_dir2_data_get_ftype
         1.52%  [kernel]  [k] do_raw_spin_lock
      
      Profile after, at an unlink rate of ~125k files/s (+50% improvement)
      has largely dropped the leaf verification debug overhead out of the
      profile.
      
        16.53%  [kernel]  [k] __xfs_dir3_data_check
        12.53%  [kernel]  [k] xfs_verify_dir_ino
         7.97%  [kernel]  [k] memcpy
         3.36%  [kernel]  [k] xfs_dir2_data_get_ftype
         2.86%  [kernel]  [k] __pv_queued_spin_lock_slowpath
      
      Create shows a similar change in profile and a +25% improvement in
      performance.
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Reviewed-by: NDarrick J. Wong <djwong@kernel.org>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NDarrick J. Wong <djwong@kernel.org>
      1fea323f
  4. 29 7月, 2020 1 次提交
  5. 12 3月, 2020 4 次提交
  6. 23 11月, 2019 3 次提交
  7. 14 11月, 2019 2 次提交
  8. 11 11月, 2019 18 次提交
  9. 05 11月, 2019 1 次提交
  10. 31 8月, 2019 5 次提交
  11. 13 8月, 2019 1 次提交
  12. 29 6月, 2019 1 次提交