Dropping eBPF CPU Cost by About 90% with Memoization (Not AI Gen)
The authors of an eBPF security agent reduced CPU cost by approximately 90% by implementing memoization to cache which policy applies to each file based on inode, mount ID, and mount namespace ID. Previously, the system inefficiently re-walked the entire directory path for each file access to determine applicable policies; the cache eliminates redundant work for repeated accesses to the same files or files within the same directory tree. The solution has been open-sourced on GitHub.