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

[Accton] Fix high CPU utilization caused by chassis.get_change_event() #8901

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

Conversation

seanwu-ec
Copy link
Contributor

@seanwu-ec seanwu-ec commented Oct 5, 2021

Same as #8900
models: AS4630-54TE, AS9726-32D

Why I did it

Correct get_change_event() wait and timeout mechanism to avoid high CPU utilization.

How I did it

Make sure get_change_event() behaves as documentation said, it can block the caller and handle timeout appropriately.

How to verify it

In pmon,

Use top to measure CPU usage of xcvrd. Make a comparison to confirm the improvement on CPU usage.
Code a script to keep polling get_change_event() and see if the returned data is exactly what we expect.

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012: some of our customers demands it.
  • 202106: some of our customers demands it.

Description for the changelog

[Accton] Fix xcvr busy issue

A picture of a cute animal (not mandatory but encouraged)

Alt Text

* models: AS4630-54TE, AS9726-32D

Signed-off-by: Sean Wu <[email protected]>
* The original design will use 'docker' to check operating environment.
  But that command might get stuck occasionally when it is called in the
  context of 'determine-reboot-cause.service'. It is suspetced the
  reason why it gets stucked is related to the service status of
  'containerd'.
* Change to use 'which systemctl' to check operation environment.
  When systemctl exists, returns 0. (In Host os env)
  When it does not exist, returns 1. (In docker os env)

Signed-off-by: Sean Wu <[email protected]>
@seanwu-ec seanwu-ec closed this Jan 19, 2022
@seanwu-ec seanwu-ec reopened this Jan 19, 2022
@seanwu-ec seanwu-ec marked this pull request as draft January 19, 2022 01:28
@seanwu-ec seanwu-ec marked this pull request as ready for review January 19, 2022 01:29
@seanwu-ec seanwu-ec requested a review from a team as a code owner June 10, 2022 02:01
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.

2 participants