1. 08 4月, 2021 1 次提交
  2. 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
  3. 12 3月, 2020 1 次提交
  4. 23 11月, 2019 4 次提交
  5. 14 11月, 2019 1 次提交
  6. 11 11月, 2019 14 次提交
  7. 05 11月, 2019 1 次提交
  8. 29 6月, 2019 3 次提交
  9. 13 3月, 2019 1 次提交
  10. 11 3月, 2019 1 次提交
  11. 19 2月, 2019 1 次提交
  12. 12 2月, 2019 2 次提交
  13. 09 6月, 2018 1 次提交
  14. 07 6月, 2018 1 次提交
    • D
      xfs: convert to SPDX license tags · 0b61f8a4
      Dave Chinner 提交于
      Remove the verbose license text from XFS files and replace them
      with SPDX tags. This does not change the license of any of the code,
      merely refers to the common, up-to-date license files in LICENSES/
      
      This change was mostly scripted. fs/xfs/Makefile and
      fs/xfs/libxfs/xfs_fs.h were modified by hand, the rest were detected
      and modified by the following command:
      
      for f in `git grep -l "GNU General" fs/xfs/` ; do
      	echo $f
      	cat $f | awk -f hdr.awk > $f.new
      	mv -f $f.new $f
      done
      
      And the hdr.awk script that did the modification (including
      detecting the difference between GPL-2.0 and GPL-2.0+ licenses)
      is as follows:
      
      $ cat hdr.awk
      BEGIN {
      	hdr = 1.0
      	tag = "GPL-2.0"
      	str = ""
      }
      
      /^ \* This program is free software/ {
      	hdr = 2.0;
      	next
      }
      
      /any later version./ {
      	tag = "GPL-2.0+"
      	next
      }
      
      /^ \*\// {
      	if (hdr > 0.0) {
      		print "// SPDX-License-Identifier: " tag
      		print str
      		print $0
      		str=""
      		hdr = 0.0
      		next
      	}
      	print $0
      	next
      }
      
      /^ \* / {
      	if (hdr > 1.0)
      		next
      	if (hdr > 0.0) {
      		if (str != "")
      			str = str "\n"
      		str = str $0
      		next
      	}
      	print $0
      	next
      }
      
      /^ \*/ {
      	if (hdr > 0.0)
      		next
      	print $0
      	next
      }
      
      // {
      	if (hdr > 0.0) {
      		if (str != "")
      			str = str "\n"
      		str = str $0
      		next
      	}
      	print $0
      }
      
      END { }
      $
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Reviewed-by: NDarrick J. Wong <darrick.wong@oracle.com>
      Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
      0b61f8a4
  15. 05 6月, 2018 2 次提交
  16. 24 3月, 2018 1 次提交
  17. 12 3月, 2018 1 次提交
  18. 29 1月, 2018 1 次提交
    • C
      Split buffer's b_fspriv field · fb1755a6
      Carlos Maiolino 提交于
      By splitting the b_fspriv field into two different fields (b_log_item
      and b_li_list). It's possible to get rid of an old ABI workaround, by
      using the new b_log_item field to store xfs_buf_log_item separated from
      the log items attached to the buffer, which will be linked in the new
      b_li_list field.
      
      This way, there is no more need to reorder the log items list to place
      the buf_log_item at the beginning of the list, simplifying a bit the
      logic to handle buffer IO.
      
      This also opens the possibility to change buffer's log items list into a
      proper list_head.
      
      b_log_item field is still defined as a void *, because it is still used
      by the log buffers to store xlog_in_core structures, and there is no
      need to add an extra field on xfs_buf just for xlog_in_core.
      Signed-off-by: NCarlos Maiolino <cmaiolino@redhat.com>
      Reviewed-by: NBill O'Donnell <billodo@redhat.com>
      Reviewed-by: NDarrick J. Wong <darrick.wong@oracle.com>
      [darrick: minor style changes]
      Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
      fb1755a6
  19. 09 1月, 2018 2 次提交