]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
populate: improve attr creation runtime
authorDarrick J. Wong <djwong@kernel.org>
Wed, 18 Jan 2023 00:44:18 +0000 (16:44 -0800)
committerZorro Lang <zlang@kernel.org>
Sun, 22 Jan 2023 12:33:55 +0000 (20:33 +0800)
commit39bb1e3d3b2c78005fdb4053b06a361cd4ff4c65
tree2ea6b46951bc285a611d2f8939f70287f94e5bc3
parent3ea9a3274403ad1cc07fde4d08bde9688b2875f1
populate: improve attr creation runtime

Replace the file creation loops with a python script that does
everything we want from a single process.  This reduces the runtime of
_scratch_xfs_populate substantially by avoiding thousands of execve
overhead.  This patch builds on the previous one by reducing the runtime
of xfs/349 from ~45s to ~15s.

For people who don't have python3, use setfattr's "restore" mode to bulk
create xattrs.  This reduces runtime to about ~25s.

[zlang: add popattr.py into src/Makefile install list]

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
common/populate
src/Makefile
src/popattr.py [new file with mode: 0755]