intel / intel-cmt-cat

User space software for Intel(R) Resource Director Technology
http://www.intel.com/content/www/us/en/architecture-and-technology/resource-director-technology.html
Other
693 stars 183 forks source link

Fix pqos startup vs. clock stepping race condition #201

Closed gsauthof closed 2 years ago

gsauthof commented 2 years ago

This change fixes #194 by replacing the custom nanosleep time computation with a timerfd file descriptor.

Description

See https://github.com/intel/intel-cmt-cat/issues/194#issuecomment-978161482 for a detailed analysis.

Affected parts

Motivation and Context

Previously, I noticed pqos consuming 100% and calling syscalls at an ultra high rate, when started as part of a systemd service, during boot.

Obviously, such an issue is a show stopper for serious usage.

How Has This Been Tested?

Tested it in the environment where I previously could reproduce the issue very reliably.

Types of changes

Checklist:

gsauthof commented 2 years ago

PS: As a drive-by fix I also removed the stripping of the executables. Looks like this is better left to the packaging folks. (e.g. rpm strips binaries, by default)

NB: Although the executables were stripped, the shared object wasn't.