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

refactor(userspace/libsinsp): polish and enable filter caching #1906

Merged
merged 2 commits into from
Jun 20, 2024

Conversation

jasondellaluce
Copy link
Contributor

What type of PR is this?

/kind cleanup

/kind feature

Any specific area of the project related to this PR?

/area libsinsp

/area tests

Does this PR require a change in the driver versions?

What this PR does / why we need it:

The usage of caching in sinsp filters (and thus, Falco rules) has been a shy experiment from some time ago that was never finalized. I think this is generally something that could be useful and could help saving few CPU % points on high loads, even though from my synthetic measurements this could account for a max of 1-2% savings.

This PR refactors the code area involved, and enables caching in filters. It does so by introducing an abstract interface that can be used as-is or customized by the different adopters, and the whole installation into filters is taken care of by the filter compiler. This moves on from the previous scratch implementation with raw pointers and no clear injection point. Tests have been added accordingly.

Which issue(s) this PR fixes:

Special notes for your reviewer:

/milestone 0.18.0

Does this PR introduce a user-facing change?:

refactor(userspace/libsinsp): polish and enable filter caching

Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
@jasondellaluce jasondellaluce force-pushed the refactor/enable-filter-caching branch from 9a13934 to 50ee9c9 Compare June 19, 2024 16:21
Copy link
Contributor

@FedeDP FedeDP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@poiana
Copy link
Contributor

poiana commented Jun 20, 2024

LGTM label has been added.

Git tree hash: 6e240040ab164978fc172dc9afa2a089be44ed7b

Copy link
Member

@Andreagit97 Andreagit97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@poiana
Copy link
Contributor

poiana commented Jun 20, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Andreagit97, FedeDP, jasondellaluce

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [Andreagit97,FedeDP,jasondellaluce]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@poiana poiana merged commit c5f51cf into master Jun 20, 2024
40 checks passed
@poiana poiana deleted the refactor/enable-filter-caching branch June 20, 2024 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants