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][202012br] Fix high CPU utilization caused by chassis.get_change_event() #8900

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

Conversation

seanwu-ec
Copy link
Contributor

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

Models: as5835-54x, as7726-32x

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,

  1. Use top to measure CPU usage of xcvrd. Make a comparison to confirm the improvement on CPU usage.
  2. 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

Description for the changelog

[Accton] Fix xcvrd busy issue

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

Alt Text

* correct the wait and timeout mechanism for better CPU usage.
* Models: AS7726-32X, AS5835-54X

Signed-off-by: Sean Wu <sean_wu@edge-core.com>
* 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 <sean_wu@edge-core.com>
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.

None yet

1 participant