forked from acatangiu/firecracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
jailer: fix perf regression when closing open FDs
Fixes the mechanism for closing open FDs in jailer which was based on the SC_OPEN_MAX system constant. Such an approach can lead to bad performance when this value is very high. The method for closing file descriptors is now chosen based on the environment: 1. we try to call into the close_range syscall (available on kernels >=5.9) 2. we fallback to reading from /proc/self/fd (for kernels <5.9) Fixes firecracker-microvm#3542. Signed-off-by: Grzegorz Uriasz <[email protected]> Co-authored-by: Diana Popa <[email protected]>
- Loading branch information
Showing
4 changed files
with
134 additions
and
20 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,6 +65,7 @@ | |
'serde_json', | ||
'shlex', | ||
'snapshot', | ||
'static_assertions', | ||
'subtle', | ||
'syn', | ||
'thiserror', | ||
|