Skip to content

Commit

Permalink
SCHED_RR for network io
Browse files Browse the repository at this point in the history
  • Loading branch information
baranovmv committed Dec 3, 2024
1 parent 212c322 commit cac69bb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ bool Thread::enable_realtime() {
errno_to_str(err).c_str());
return false;
}
roc_log(LogDebug, "thread: set realtime priority");

return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ NetworkLoop::NetworkLoop(core::IPool& packet_pool,
task_sem_.data = this;
task_sem_initialized_ = true;

enable_realtime();
if (!(started_ = Thread::start())) {
init_status_ = status::StatusErrThread;
return;
Expand Down
8 changes: 4 additions & 4 deletions src/internal_modules/roc_rtcp/rtt_estimator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ void RttEstimator::update(core::nanoseconds_t local_report_ts,
rtt_stats_.add(p);
RttOffsetPair min = rtt_stats_.mov_min();

metrics_.clock_offset = clock_offset;
metrics_.rtt = rtt;
// metrics_.clock_offset = min.offset;
// metrics_.rtt = min.rtt;
// metrics_.clock_offset = clock_offset;
// metrics_.rtt = rtt;
metrics_.clock_offset = min.offset;
metrics_.rtt = min.rtt;

has_metrics_ = true;

Expand Down

0 comments on commit cac69bb

Please sign in to comment.