Skip to content

Commit 65f3947

Browse files
Keep tutorial prose on the user path
1 parent 16997a9 commit 65f3947

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/51-tcp-quarantine/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ When `bpf_sock_destroy` tears down a socket, the kernel executes the protocol's
431431
- Writes may produce `EPIPE` with a `SIGPIPE` signal.
432432
- The exact behavior varies by kernel version and the timing of operations.
433433

434-
The test included with this tutorial accepts any of these as valid indicators that the connection was torn down.
434+
Treat any of these outcomes as application-visible evidence that the connection was torn down; confirm the exact behavior expected by your application and kernel version.
435435

436436
## Building and Running
437437

src/51-tcp-quarantine/README.zh.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ sudo nsenter --net=/proc/<target-pid>/ns/net -- ./tcp_quarantine \
429429
- 写操作可能产生 `EPIPE` 并伴随 `SIGPIPE` 信号。
430430
- 具体行为因内核版本和操作时机而异。
431431

432-
本教程附带的测试接受以上任何一种作为连接被拆除的有效指示
432+
这些结果都可能表示连接已经被拆除;请结合你的应用行为和内核版本确认预期现象
433433

434434
## 编译与运行
435435

src/52-fsession-latency/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ When a file-backed service shows read-latency spikes, application-level timing t
44

55
This tutorial demonstrates how to measure `vfs_read` call latency using the **fsession** mechanism introduced in Linux 7.0. fsession is a new eBPF program type that runs once at function entry and once at return, with built-in per-invocation storage for correlating the two phases. The tool timestamps function entry, computes latency at return, filters by process and threshold, and reports the object type plus a `major:minor:inode` identity through a ring buffer.
66

7-
`vfs_read` is not limited to regular files: pipes, character devices, and other file-backed objects also pass through it. A slow event therefore identifies a slow `vfs_read` call, not necessarily slow storage. The deterministic test below deliberately uses a pipe and labels it `type=fifo`; it separately checks that ordinary file reads are labeled `type=regular`.
7+
`vfs_read` is not limited to regular files: pipes, character devices, and other file-backed objects also pass through it. A slow event therefore identifies a slow `vfs_read` call, not necessarily slow storage. Use the reported `type` together with the `major:minor:inode` identity to distinguish regular-file reads from FIFOs and other VFS objects.
88

99
> Complete source: <https://github.com/eunomia-bpf/bpf-developer-tutorial/tree/main/src/52-fsession-latency>
1010

src/52-fsession-latency/README.zh.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
本教程展示如何使用 Linux 7.0 引入的 **fsession** 机制测量 `vfs_read` 调用延迟。fsession 是一种新的 eBPF 程序类型,它在函数进入时执行一次、返回时再执行一次,并提供内置的调用级存储来关联这两个阶段。工具会在函数进入时记录时间戳、返回时计算延迟,按进程和阈值过滤后,通过 ring buffer 上报对象类型和 `major:minor:inode` 身份。
66

7-
`vfs_read` 不只处理普通文件,pipe、字符设备等文件对象也会经过它。因此慢事件表示某次 `vfs_read` 较慢,并不必然说明存储较慢。下面的确定性测试故意使用 pipe,并将其标成 `type=fifo`;它还会单独检查普通文件读被标成 `type=regular`
7+
`vfs_read` 不只处理普通文件,pipe、字符设备等文件对象也会经过它。因此慢事件表示某次 `vfs_read` 较慢,并不必然说明存储较慢。应结合输出中的 `type``major:minor:inode` 身份,区分普通文件读、FIFO 以及其他 VFS 对象
88

99
> 完整源码:<https://github.com/eunomia-bpf/bpf-developer-tutorial/tree/main/src/52-fsession-latency>
1010

0 commit comments

Comments
 (0)