feat(core, kernel): use a lock-free container in the object provider - #136
Conversation
EnriqueParodi
left a comment
There was a problem hiding this comment.
Hi Manuel, can you please relay my feedback to the author?
The pimpl keeps xenium out of the public header, and the move operations are defaulted out of line with the destructor guarding the moved-from state. Both right.
-
xenium's utils.hpp defines getticks for sparc, x86_64 and _M_AMD64 and #errors otherwise. The error is at file scope, so it fires on include, and utils.hpp arrives through marked_ptr.hpp.
Nothing here uses the code that needs it. getticks only feeds utils::random(), which is called only from the two kfifo queues, and this PR uses harris_michael_list_based_set.
The missing case can be added with a PATCH_COMMAND on the FetchContent, and is worth sending upstream since the library is missing it for all of aarch64:
#elif defined(__aarch64__) static inline std::uint64_t getticks(void) { std::uint64_t ret; __asm__ volatile("mrs %0, cntvct_el0" : "=r"(ret)); return ret; }We would rather patch it than turn off the arm job, which is our only non-x86 coverage.
-
FetchContent_Declare pulls the tarball from GitHub with no URL_HASH. Everything else comes through conan and is pinned by conan.lock, which has a CI job checking for drift. This sits outside both, and a dependency we plan to remove is the one most likely to be forgotten.
No checks have run on this PR yet.
Thanks!
49b338d to
6155e76
Compare
6334db7 to
13d6dd0
Compare
abc8fcc to
91ce2b4
Compare
|
Thanks for the review, @EnriqueParodi: This is the respose:
|
13d6dd0 to
59cd9ce
Compare
| // std | ||
| #include <algorithm> | ||
| #include <chrono> | ||
| #include <cstddef> |
There was a problem hiding this comment.
❌ misc-include-cleaner ❌
included header cstddef is not used directly
| #include <cstddef> |
| // scheduling loop; turning the jump into a nested loop is a change to | ||
| // the timing path, not a lint fix, so the check is waived here. | ||
| goto doSleep; // NOLINT(cppcoreguidelines-avoid-goto,hicpp-avoid-goto) | ||
| goto doSleep; // NOLINT(hicpp-avoid-goto) |
There was a problem hiding this comment.
❌ cppcoreguidelines-avoid-goto ❌
avoid using goto for flow control
59cd9ce to
2fe9f3e
Compare
| // scheduling loop; turning the jump into a nested loop is a change to | ||
| // the timing path, not a lint fix, so the check is waived here. | ||
| goto doSleep; // NOLINT(cppcoreguidelines-avoid-goto,hicpp-avoid-goto) | ||
| goto doSleep; // NOLINT(cppcoreguidelines-avoid-goto) |
There was a problem hiding this comment.
❌ hicpp-avoid-goto ❌
avoid using goto for flow control
72df445 to
0a68785
Compare
2c1db97 to
3f75bc8
Compare
6487e46 to
5de3ba3
Compare
Replaces the object provider's container with xenium's lock-free one to reduce memory corruption under stress, ahead of the kernel refactoring. Resolves SEN-1759
3f75bc8 to
b1650b6
Compare
Resolves SEN-1759