tetragon icon indicating copy to clipboard operation
tetragon copied to clipboard

tetragon/pkg: add user-configurable BPF_F_NO_PREALLOC flag support

Open kyledong-suse opened this issue 1 month ago • 5 comments

Description

This commit adds support for controlling the BPF_F_NO_PREALLOC flag on BPF maps through CLI flags. Users can now disable preallocation globally or for specific maps to reduce memory usage.

Fixes: #4249

kyledong-suse avatar Nov 13 '25 16:11 kyledong-suse

Deploy Preview for tetragon ready!

Name Link
Latest commit 5d5bd6ebeeb7b4ec189b77e9c34be90c8c66faed
Latest deploy log https://app.netlify.com/projects/tetragon/deploys/69437d4817685e0008b2d054
Deploy Preview https://deploy-preview-4340--tetragon.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

netlify[bot] avatar Nov 17 '25 15:11 netlify[bot]

Thanks for taking time to review this PR @mtardy! Let's wait @kkourt for his comment about this idea. If you all agree to have a generic flag to enable/disable BPF_F_NO_PREALLOC, I can modify the title of the issue as well as this PR and commit messages.

kyledong-suse avatar Nov 21 '25 15:11 kyledong-suse

is it ready for re-review @kyledong-suse ? :)

mtardy avatar Dec 01 '25 11:12 mtardy

@mtardy @kkourt I have modified the implementation regarding to the discussion in #4249 It's ready for re-review. Thanks!

kyledong-suse avatar Dec 01 '25 14:12 kyledong-suse

I need to check the issue properly, but did we discuss performance implications? I guess policy_filter_maps is fine, I'm not sure override_task is that straight forward

It has been discussed a bit in the issue. Additionally, #4204 proposed an idea to use shared override_task map, which will optimize both memory utilization and CPU consumption.

kyledong-suse avatar Dec 03 '25 13:12 kyledong-suse