Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v1.2 backport] Memory optimizations: remove BTF and kallsyms caches #3036

Merged
merged 2 commits into from
Oct 23, 2024

Conversation

mtardy
Copy link
Member

@mtardy mtardy commented Oct 23, 2024

Backport in v1.2 of #2937.

[ upstream commit f6bc9f7 ("[ksyms] Do not cache ksyms to reduce
memory consumption") ]

We use ksyms for checking the proper exit hooks when loading the base
sensor. Furthermore, we use it when we add a kprobe policy for a
function that is part of a kernel module.

Having that always in memory, uses a lot of memory. This patch makes the
read of ksyms when we need that.

Signed-off-by: Anastasios Papagiannis <tasos.papagiannnis@gmail.com>
[ upstream commit 6f70926 ("[btf] Flush kernel spec (BTF) after
loading a sensor") ]

This patch flushes the BTF when we complete the loading of a sensor.

Signed-off-by: Anastasios Papagiannis <tasos.papagiannnis@gmail.com>
@mtardy mtardy added the kind/backport This PR provides functionality previously merged into master. label Oct 23, 2024
@mtardy mtardy requested a review from a team as a code owner October 23, 2024 14:20
@mtardy mtardy requested review from jrfastab and removed request for a team October 23, 2024 14:20
@mtardy mtardy added the release-note/misc This PR makes changes that have no direct user impact. label Oct 23, 2024
@mtardy mtardy requested a review from tpapagian October 23, 2024 14:21
@mtardy mtardy merged commit 9f7b0f0 into v1.2 Oct 23, 2024
37 of 39 checks passed
@mtardy mtardy deleted the pr/mtardy/backport-cache-memory branch October 23, 2024 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/backport This PR provides functionality previously merged into master. release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants