Dropping eBPF CPU Cost by About 90% with Memoization (Not AI Gen)
We then reconstruct the path, walk up parent dentries, and check whether the file or any ancestor directory has a matching policy. While this works, it isn’t performant, and we end up repeating much of the work for files we have already seen (for example, database accesses that repeatedly reaccess file paths).So, we cache which policy applies for each inode. This dropped our kernel CPU cost by about 90%.Additionally, we recently open sourced our repo, so everything in this blog post can be found at https://github.com/bomfather/agent.The ProblemBefore the cache, every file open would walk through the entire path.
- ▪We then reconstruct the path, walk up parent dentries, and check whether the file or any ancestor directory has a matching policy.
- ▪While this works, it isn’t performant, and we end up repeating much of the work for files we have already seen (for example, database accesses that repeatedly reaccess file paths).So, we cache which policy applies for each inode.
- ▪This dropped our kernel CPU cost by about 90%.Additionally, we recently open sourced our repo, so everything in this blog post can be found at https://github.com/bomfather/agent.The ProblemBefore the cache, every file open would walk throug
Hacker News (AI / LLM) files mainly under ai. We currently carry 4,820 of its stories.
Story provenance
Source · retrieval · rights · ranking — open for full record
inspect →
Story provenance
Attribution is not the same as permission. This drawer separates discovery metadata, excerpts, WeSearch-generated summaries, reuse status, and whether the publisher receives the visit. Nothing here claims a legal grant the publisher has not made.
Record
| Original publisher | nathan naveen |
| Canonical URL | https://nathannaveen.dev/posts/dropping-ebpf-cpu-cost-by-90/ |
| Publication time | Mon, 14 Sep 2026 14:29:23 +0000 |
| Retrieval time | 2026-09-14T14:46:51.323Z |
| Last seen | 2026-09-14T14:46:51.323Z |
| Headline source | Publisher (no WeSearch rewrite) |
| Excerpt source | publisher body |
| Excerpt method | First ~120 words (~800 chars) of extracted publisher body, fair-use limited. |
| Summary | WeSearch · cerebras-chat (WeSearch summarizer) |
| Summary source text | contentText |
| Citation coverage | Summary is a WeSearch-generated derivative; primary citation is the original publisher URL. |
| Cluster | OGkHy3FTSfhV · 1 stories |
| Cluster logic | Grouped by semantic title/content similarity across sources within a rolling window. Same-publisher template collisions are excluded from coverage comparison. |
| Ranking reason | Story pages are not engagement-ranked. Hub feeds use recency, with optional source-diversified chronological ordering (cap consecutive stories per source). No personalized ranking. |
| Publisher visit | Yes — open original |
| Substitutes article? | No — link-out required for full text |
Rights status (four layers)
WeSearch handling by dimension
| Indexing | May the item be indexed (stored, ranked, made findable)? | Allowed |
| Snippet | May a short excerpt of the publisher's text be shown? | Allowed |
| AI summary | May WeSearch generate its own short summary of the article? | Limited |
| Retrieval / RAG | May the content be exposed for third-party retrieval-augmented generation? | Not asserted |
| Model training | May the content be used to train AI models? | Not asserted |
| Commercial reuse | May the content be reused commercially? | Not permitted |
Basis: Derived from the published RSS/Atom feed. Contact: [email protected]. Reviewed: 2026-07-24.
Opening excerpt (first ~120 words) tap to expand
Dropping eBPF CPU Cost by About 90% With Memoization (Not AI Gen)My brother and I spent a lot of time designing our eBPF security agent to be really fast from the ground up, but recently we discovered we could make it much faster using memoization!A couple of weeks ago, I profiled the eBPF code and found that the most expensive part of the protection isn’t actually enforcing a policy (allow/deny), but figuring out which policy applies to a given file open.Our policies are path based, so our eBPF leverages an LSM hook that triggers on file open. We then reconstruct the path, walk up parent dentries, and check whether the file or any ancestor directory has a matching policy.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at nathan naveen.