You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(prober): skip readdir on pseudo filesystems (/proc, /sys, cgroup, ...)
read/write/open already filter pseudo-filesystems via is_regular_file(), but the
readdir probe (iterate_dir) operates on a directory and so was never filtered.
As a result /proc-walking monitors dominated the trace: analysis of the v4
capture showed readdir was ~35% of ALL VFS events, and htop alone — reading
/proc/<pid>/task on every refresh — was ~27% of all events, none of it real
storage I/O.
- Factor the (previously duplicated) pseudo-fs magic denylist into a single
is_pseudo_fs_magic() helper, plus an is_pseudo_fs_file() convenience wrapper.
is_regular_file()/is_regular_file_from_path() now call it (no behavior change —
identical magic set, including tmpfs).
- trace_readdir() now returns early when the directory lives on a pseudo fs.
Effect: drops the /proc/sys/cgroup readdir flood at the source (~25-30% fewer
fs events on this workload), cutting trace size, tracer overhead, and the
observer effect from monitoring tools and the tracer's own /proc polling. Real
storage readdir (ext4/overlayfs/squashfs/nfs/...) is unaffected.
tmpfs is kept in the denylist to preserve existing read/write behavior; to also
capture tmpfs (/tmp, /dev/shm) as real I/O, drop TMPFS_MAGIC from
is_pseudo_fs_magic() — deferred because its volume impact (esp. vLLM /dev/shm)
needs a real-run measurement.
No eBPF C compile-tested here (needs clang+BCC+root); run scripts/smoke_test.sh.
pytest: 71 passed.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments