Skip to content

Commit 2ffa5d7

Browse files
test(lmbench): 添加 VFS 层性能测试脚本
添加虚拟文件系统 (VFS) 层的性能测试脚本: 系统调用延迟测试: - vfs_open_lat.sh: open 系统调用延迟 - vfs_read_lat.sh: read 系统调用延迟 - vfs_write_lat.sh: write 系统调用延迟 - vfs_stat_lat.sh: stat 系统调用延迟 - vfs_fstat_lat.sh: fstat 系统调用延迟 - vfs_fcntl_lat.sh: fcntl 系统调用延迟 - vfs_select_lat.sh: select 系统调用延迟 带宽测试: - vfs_read_pagecache_bw.sh: 页缓存读带宽测试 这些测试评估文件系统抽象层的性能开销。 Signed-off-by: yuming <mingjiangyu1@qq.com>
1 parent 977b749 commit 2ffa5d7

File tree

8 files changed

+128
-0
lines changed

8 files changed

+128
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
# Test: vfs_fcntl_lat
3+
# Binary: lat_fcntl
4+
# Description: VFS fcntl latency test
5+
6+
set -e
7+
8+
if [ -z "$LMBENCH_BIN" ]; then
9+
echo "Error: Please source env.sh first"
10+
exit 1
11+
fi
12+
13+
echo "=== Running VFS fcntl latency test ==="
14+
${LMBENCH_BIN}/lat_fcntl -P 1 -W 30 -N 200
15+
16+
echo "Test completed successfully"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
# Test: vfs_fstat_lat
3+
# Binary: lat_syscall
4+
# Description: VFS fstat syscall latency test
5+
6+
set -e
7+
8+
if [ -z "$LMBENCH_BIN" ]; then
9+
echo "Error: Please source env.sh first"
10+
exit 1
11+
fi
12+
13+
echo "=== Running VFS fstat latency test ==="
14+
${LMBENCH_BIN}/lat_syscall -P 1 fstat test_file
15+
16+
echo "Test completed successfully"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
# Test: vfs_open_lat
3+
# Binary: lat_syscall
4+
# Description: VFS open syscall latency test
5+
6+
set -e
7+
8+
if [ -z "$LMBENCH_BIN" ]; then
9+
echo "Error: Please source env.sh first"
10+
exit 1
11+
fi
12+
13+
echo "=== Running VFS open latency test ==="
14+
${LMBENCH_BIN}/lat_syscall -P 1 -W 1000 -N 1000 open testfile
15+
16+
echo "Test completed successfully"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
# Test: vfs_read_lat
3+
# Binary: lat_syscall
4+
# Description: VFS read syscall latency test
5+
6+
set -e
7+
8+
if [ -z "$LMBENCH_BIN" ]; then
9+
echo "Error: Please source env.sh first"
10+
exit 1
11+
fi
12+
13+
echo "=== Running VFS read latency test ==="
14+
${LMBENCH_BIN}/lat_syscall -P 1 read
15+
16+
echo "Test completed successfully"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
# Test: vfs_read_pagecache_bw
3+
# Binary: bw_file_rd
4+
# Description: VFS read page cache bandwidth test
5+
6+
set -e
7+
8+
if [ -z "$LMBENCH_BIN" ]; then
9+
echo "Error: Please source env.sh first"
10+
exit 1
11+
fi
12+
13+
echo "=== Running VFS read page cache bandwidth test ==="
14+
${LMBENCH_BIN}/bw_file_rd -P 1 -W 30 -N 300 512m io_only ${LMBENCH_EXT2_DIR}/${LMBENCH_TEST_FILE}
15+
16+
echo "Test completed successfully"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
# Test: vfs_select_lat
3+
# Binary: lat_select
4+
# Description: VFS select latency test
5+
6+
set -e
7+
8+
if [ -z "$LMBENCH_BIN" ]; then
9+
echo "Error: Please source env.sh first"
10+
exit 1
11+
fi
12+
13+
echo "=== Running VFS select latency test ==="
14+
${LMBENCH_BIN}/lat_select -P 1 file
15+
16+
echo "Test completed successfully"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
# Test: vfs_stat_lat
3+
# Binary: lat_syscall
4+
# Description: VFS stat syscall latency test
5+
6+
set -e
7+
8+
if [ -z "$LMBENCH_BIN" ]; then
9+
echo "Error: Please source env.sh first"
10+
exit 1
11+
fi
12+
13+
echo "=== Running VFS stat latency test ==="
14+
${LMBENCH_BIN}/lat_syscall -P 1 -W 1000 -N 1000 stat testfile
15+
16+
echo "Test completed successfully"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
# Test: vfs_write_lat
3+
# Binary: lat_syscall
4+
# Description: VFS write syscall latency test
5+
6+
set -e
7+
8+
if [ -z "$LMBENCH_BIN" ]; then
9+
echo "Error: Please source env.sh first"
10+
exit 1
11+
fi
12+
13+
echo "=== Running VFS write latency test ==="
14+
${LMBENCH_BIN}/lat_syscall -P 1 write
15+
16+
echo "Test completed successfully"

0 commit comments

Comments
 (0)