23 karma · joined Aug 19, 2021 (5y ago) · 13 submissions
1.
How HRT patched a binary-only library under time pressure(hudsonrivertrading.com ↗)
2 points · by deadcanard · 2y ago · discuss
comment 3y ago · link · parent
comment 3y ago · link · parent
3) CAT does not recognize processes but resctl does. Feels we're kinda nitpicking here...
Last of your point: Agree, that gives you 9ish usable slices which is not very much depending on the number of cores. That was my point I was trying to make.
comment 3y ago · link · parent
comment 3y ago · link · parent
I don't think you'll find many articles that detail these points. Now, they might be trivial to you and that's totally fair. But the goal is to address a wide audience. Additionally, the article is not addressing how to use HPs but that's for part 2.
Wrt to other points, I certainly agree they are important topics to explore. I would add using perf is super important to easily access the perf counters
comment 3y ago · link · parent
comment 3y ago · link · parent
Your article does cover how to use/enable them while the post does not. But it's meant for part 2
comment 3y ago · link · parent
Stack access is another story as it's usually local and sequential so it might not be that useful.
comment 3y ago · link · parent
comment 4y ago · link · parent
There is no equivalent in the standard C++ lib. Though it's very easy to write one. If you use gcc's libstdc++, the internal shared_ptr is actually templated on the lock policy so you can do something like: template<typename T> using nt_shared_ptr = std::__shared_ptr<T, __gnu_cxx::_S_single>;
Then if you use nt_shared_ptr instead, the code will be much simpler.
That said, your C++ code is incorrect as well. It gives the ownership to the shared ptr of a stack variable. During the destruction of the shared_ptr, delete will be called on a stack address leading to undefined behavior