Skip to content

Commit 92821de

Browse files
1a1a11aclaude
andcommitted
prober: capture tmpfs (drop TMPFS_MAGIC from pseudo-fs denylist)
Treat tmpfs/ramfs as real, storage-relevant filesystems rather than pseudo: their read/write/mmap/readdir are now captured like any real fs. This is a deliberate behavior change from the prior is_regular_file(), which dropped tmpfs — /dev/shm (shared memory) and /tmp scratch are I/O worth recording. Only synthetic introspection/IPC filesystems (proc, sysfs, cgroup, tracefs, debugfs, bpffs, sockfs, pipefs, devpts, devtmpfs, ...) remain filtered. Note: on this workload tmpfs read/write/mmap were previously invisible (filtered pre-log), so the added volume — chiefly vLLM /dev/shm — is unmeasured; validate with scripts/smoke_test.sh and watch fs-shard volume on a real run. pytest: 71 passed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 8d4ffd7 commit 92821de

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/tracer/prober/prober.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -918,15 +918,17 @@ static __always_inline void get_file_source(struct file *file, u32 *dev,
918918
* /proc polling — see analysis: ~27% of all VFS events were htop reading
919919
* /proc/<pid>/task.
920920
*
921-
* NOTE: TMPFS_MAGIC is listed here to preserve the existing read/write filtering
922-
* behavior unchanged. To also capture tmpfs (/tmp, /dev/shm) as real I/O, remove
923-
* the TMPFS_MAGIC case below — it then applies uniformly to every op.
921+
* NOTE: tmpfs (and ramfs) are deliberately NOT treated as pseudo here — they
922+
* hold real application data (/dev/shm shared memory, /tmp scratch) that is
923+
* storage-relevant, so their read/write/mmap/readdir are captured like any real
924+
* filesystem. (This is a deliberate change from the previous behavior, which
925+
* dropped tmpfs in is_regular_file.) ramdisk-backed data is still I/O we care
926+
* about; only the synthetic introspection/IPC filesystems below are dropped.
924927
*/
925928
static __always_inline bool is_pseudo_fs_magic(unsigned long magic) {
926929
switch (magic) {
927930
case PROC_SUPER_MAGIC:
928931
case SYSFS_MAGIC:
929-
case TMPFS_MAGIC:
930932
case SOCKFS_MAGIC:
931933
case DEBUGFS_MAGIC:
932934
case DEVPTS_SUPER_MAGIC:

0 commit comments

Comments
 (0)