AltraMayor / AltraMayor/gatekeeper

Review `time_resolution_init()`

Open
#82 0 comments 0 reactions 0 assignees View on GitHub
enhancement good first issue
Dominant language
C
Stars
1.6k
Forks
252
PR merge metrics
No merged PRs in 30d

Description

Function `time_resolution_init()` located in file `main/main.c` estimates the frequency of the TSC register and sets its result in a couple global variable in different units (e.g. `cycles_per_sec`). DPDK has function `rte_get_tsc_hz()`, which is equivalent to the global variable `cycles_per_sec`.

Which function is more precise, `time_resolution_init()` or `rte_get_tsc_hz()`? If `time_resolution_init()`, we should submit a patch to DPDK. In any case, we should adopt `rte_get_tsc_hz()` in `time_resolution_init()` to simplify our code.

We should also investigate if the global variables are still needed. For example, should we replace variable `cycles_per_sec` with `rte_get_tsc_hz()` or keep it?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.