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

issue: Refactor event_handler_manager #245

Open
wants to merge 2 commits into
base: vNext
Choose a base branch
from

Conversation

pasis
Copy link
Member

@pasis pasis commented Oct 2, 2024

Description

Avoid start_thread with each reg action.
Refactor destructor.

What

Avoid start_thread with each reg action.
Refactor destructor.

Why ?

Potential CPU improvement for CPS and code cleanup.

Change type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Tests
  • Other

Check list

  • Code follows the style de facto guidelines of this project
  • Comments have been inserted in hard to understand places
  • Documentation has been updated (if necessary)
  • Test has been added (if possible)

@pasis pasis added the draft Not to review yet label Oct 2, 2024
Event handler manager is a global object with a single internal thread.
Once XLIO is initialized, there is no option not to start the internal
thread and it's used starting from the initialization method (to create
a timer event for netlink).

Therefore, there is no point in trying to start the thread with each
post action to the event handler. This can save CPU in CPS scenario.

Signed-off-by: Dmytro Podgornyi <[email protected]>
This method simply calls stop_thread(). Remove it to simply the code and
separate thread stopping from epfd closing.

Signed-off-by: Dmytro Podgornyi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
draft Not to review yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant