falcosecurity / plugin-sdk-go

Falco plugins SDK for Go
Apache License 2.0
26 stars 17 forks source link

update(pkg/cgo): set MaxHandle to 255 #70

Closed jasondellaluce closed 1 year ago

jasondellaluce commented 1 year ago

What type of PR is this?

/kind bug

/kind cleanup

Any specific area of the project related to this PR?

/area plugin-sdk

What this PR does / why we need it:

This follows up the changes of https://github.com/falcosecurity/falco/pull/2430. After that PR is merged, the number of plugins initialized at a given time (holding a valid Handle) will grow during a dry run. As such, the max number of assignable handles has been grown to a reasonably bigger number.

Note that even though MaxHandle influences the implementation of our async extraction optimization, there should be no performance regression due to the sync batch slots being skipped if unused (see: https://github.com/falcosecurity/plugin-sdk-go/blob/3856dc775cc8ab7f0043f51d5bd7191b72454339/pkg/sdk/symbols/extract/async.go#L187). I checked for the absence of performance regressions by using the benchmarks/async benchmark tool.

In the past, the value 32 was just set to have an "as low as possible" value to be changed at future needs, so this should be safe from both a functional and performance perspective.

Which issue(s) this PR fixes:

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

update(pkg/cgo): set MaxHandle to 255
poiana commented 1 year ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jasondellaluce, leogr

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](https://github.com/falcosecurity/plugin-sdk-go/blob/main/OWNERS)~~ [jasondellaluce,leogr] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
poiana commented 1 year ago

LGTM label has been added.

Git tree hash: dd66d6b9ad157be1d4048f3ddaa31660b1ed0032