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

Notime #130

Merged
merged 6 commits into from
Jun 11, 2021
Merged

Notime #130

merged 6 commits into from
Jun 11, 2021

Conversation

nhorman
Copy link
Owner

@nhorman nhorman commented Jun 11, 2021

On some smaller systems the hardware clock is insufficiently fine grained to allow the jitterentropy source to accruately measure load and store times. In these cases jitter provides a software based thread to act as timer. However, it does not offer much control over said thread, and as a result we wind up with threads contending, and subsequent hangs or extra long latency on use. Fix this in rng-tools by activing the soft timer when needed and adjusting thread counts correspondingly

Need a compile flag to ensure that we can use the new notime_imply
infrastructure. So during configure check for the new registration
symbol and add a HAVE_JITTER_NOTIME flag if we find it

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
jitter now offers support for software timing on platforms with a timer
to coarse to support valid measurements.  This new code registers our
timer thread to take advantage of this feature

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
When using the software timer, we don't need to define our own init/fini
functions, we can just use the common ones from the jitter lib that are
provided as convienience.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Add option to jitter to force use of soft timer

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Need to document our new soft timer option

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
When using soft timers, we need to limit our thread use to reduce
contention between the jitter threads and the timer threads

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
@nhorman nhorman merged commit 9134cab into master Jun 11, 2021
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.

1 participant