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

Switch to cxplat_get_current_processor_number #3959

Conversation

Alan-Jowett
Copy link
Member

@Alan-Jowett Alan-Jowett commented Oct 28, 2024

Description

This pull request includes several changes to the libs/runtime/ebpf_platform files and an update to the external/usersim submodule. The most important changes involve modifying the ebpf_get_current_cpu function to use a different method for retrieving the current processor number and adding an inline hint to the function declaration.

Changes to ebpf_get_current_cpu function:

  • libs/runtime/ebpf_platform.c: Modified the ebpf_get_current_cpu function to use cxplat_get_current_processor_number instead of KeGetCurrentProcessorNumberEx and KeGetProcessorIndexFromNumber.
  • libs/runtime/ebpf_platform.h: Added EBPF_INLINE_HINT to the ebpf_get_current_cpu function declaration.

Submodule update:

  • external/usersim: Updated submodule commit to 177182f08eb59f516f41f17e7d53a433e93100d9.

Testing

CI/CD

Reduces unbatched invoke from 37ns -> 22ns.

Documentation

No.

Installation

No.

@Alan-Jowett
Copy link
Member Author

Blocked on: microsoft/usersim#222

Signed-off-by: Alan Jowett <[email protected]>
@Alan-Jowett Alan-Jowett added this pull request to the merge queue Oct 28, 2024
Merged via the queue into microsoft:main with commit 4572f88 Oct 28, 2024
90 checks passed
@Alan-Jowett Alan-Jowett deleted the switch_to_cxplat_get_current_processor_number branch October 28, 2024 21:13
agarwalishita pushed a commit to agarwalishita/ebpf-for-windows that referenced this pull request Nov 20, 2024
* Switch to cxplat_get_current_processor_number

Signed-off-by: Alan Jowett <[email protected]>

* Fix runtime failure

Signed-off-by: Alan Jowett <[email protected]>

---------

Signed-off-by: Alan Jowett <[email protected]>
Co-authored-by: Alan Jowett <[email protected]>
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.

3 participants