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

Speedup LRU by using the faster timestamp API #3990

Merged
merged 3 commits into from
Nov 13, 2024

Conversation

Alan-Jowett
Copy link
Member

@Alan-Jowett Alan-Jowett commented Nov 8, 2024

Description

This pull request includes changes to improve the performance and alignment of the LRU map implementation in the ebpf_maps.c file. The most important changes include adding a static assertion for cache alignment and switching the time query function to optimize performance.

Performance improvements:

  • libs/execution_context/ebpf_maps.c: Replaced ebpf_query_time_since_boot(false) with KeQueryInterruptTime() to optimize the time query operation in the _insert_into_hot_list function.

Alignment improvements:

Testing

CI/CD

Before:

2024-11-12T08:24:38-0800,BPF_MAP_TYPE_LRU_HASH read,432,449,452,445,385

After:

2024-11-12T18:40:35-0800,BPF_MAP_TYPE_LRU_HASH read,247,242,239,254,254

Documentation

No.

Installation

No.

@Alan-Jowett Alan-Jowett force-pushed the speedup_lru branch 4 times, most recently from 579ec86 to 6f64fe9 Compare November 12, 2024 01:12
saxena-anurag
saxena-anurag previously approved these changes Nov 12, 2024
libs/runtime/ebpf_platform.c Show resolved Hide resolved
mikeagun
mikeagun previously approved these changes Nov 12, 2024
Alan Jowett added 3 commits November 12, 2024 14:41
Signed-off-by: Alan Jowett <[email protected]>
Signed-off-by: Alan Jowett <[email protected]>
@Alan-Jowett Alan-Jowett added this pull request to the merge queue Nov 13, 2024
Merged via the queue into microsoft:main with commit 0a7fddd Nov 13, 2024
90 checks passed
@Alan-Jowett Alan-Jowett deleted the speedup_lru branch November 13, 2024 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants