0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-25 08:12:37 +01:00

ircd::ios: Comment on constant_tsc issues with operating system suspend/hibernate.

This commit is contained in:
Jason Volk 2019-09-14 18:15:09 -07:00
parent 6450d38c04
commit 4ed000e6ab
2 changed files with 14 additions and 2 deletions

View file

@ -1736,8 +1736,11 @@ noexcept
{
_slice_stop = cycles();
auto &c(cur());
// NOTE: will fail without constant_tsc;
// NOTE: may fail without nonstop_tsc after OS suspend mode
assert(_slice_stop >= _slice_start);
auto &c(cur());
const auto last_slice
{
_slice_stop - _slice_start

View file

@ -196,12 +196,21 @@ void
ircd::ios::handler::leave(handler *const &handler)
noexcept
{
const auto slice_stop
{
cycles()
};
assert(handler && handler->descriptor);
auto &descriptor(*handler->descriptor);
assert(descriptor.stats);
auto &stats(*descriptor.stats);
stats.slice_last = cycles() - handler->slice_start;
// NOTE: will fail without constant_tsc;
// NOTE: may fail without nonstop_tsc after OS suspend mode
assert(slice_stop >= handler->slice_start);
stats.slice_last = slice_stop - handler->slice_start;
stats.slice_total += stats.slice_last;
assert(handler::current == handler);