Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Full sleep wait change for PFC watchdog (sonic-net#465)
* Sleep wait change for pfc watchdog, which still has plugins in place so isEmpty() always returns true. When issuing 'pfcwd stop' cli to stop PFC watchdog, it only clears the counter id list for physical ports under the hood, leaving lua script plugins still installed and ieEmpty() returns false. So even when PFC watchdog is stopped, the flex counter thread would wake up every 200 ms. Jun 4 17:58:51.273413 str-a7050-acs-1 ERR syncd#syncd: :- flexCounterThread: End of flex counter thread FC PFC_WD, took 33 ms Jun 4 17:58:51.471288 str-a7050-acs-1 ERR syncd#syncd: :- flexCounterThread: End of flex counter thread FC PFC_WD, took 30 ms Jun 4 17:58:51.672930 str-a7050-acs-1 ERR syncd#syncd: :- flexCounterThread: End of flex counter thread FC PFC_WD, took 31 ms Jun 4 17:58:51.882972 str-a7050-acs-1 ERR syncd#syncd: :- flexCounterThread: End of flex counter thread FC PFC_WD, took 40 ms Jun 4 17:58:52.074862 str-a7050-acs-1 ERR syncd#syncd: :- flexCounterThread: End of flex counter thread FC PFC_WD, took 31 ms This PR is to address the above observation: Fine granularize the isEmpty() to two functions---isIdsEmpty() and isPluginsEmpty(), and use the emptiness check of the counter id list, isIdsEmpty(), as the criteria for full sleep wait. This approach is generally valid because current flex counter use cases would have the presence of non-empty counter id list to be meaningful, followed by an optional execution of the Lua script plugins if they are installed. Signed-off-by: Wenda Ni <[email protected]>
- Loading branch information