Skip to content

Commit

Permalink
cpu: sched_runtime can be set. This need at least kernel 6.12
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmm committed Nov 25, 2024
1 parent cc785a0 commit 2f68587
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/fastgame_launcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,14 @@ auto main(int argc, char* argv[]) -> int {

util::apply_cpu_affinity(0, cpu_affinity);

double sched_runtime = root.get<double>("cpu.sched-runtime", util::get_sched_runtime(0, 0));

if (root.get<bool>("cpu.use-batch-scheduler")) {
util::set_process_scheduler(0, SCHED_BATCH, 0);

util::set_sched_runtime(0, sched_runtime, SCHED_BATCH, 0);
} else {
util::set_sched_runtime(0, sched_runtime, SCHED_OTHER, 0);
}

int timer_slack_ns = root.get<int>("cpu.timer-slack", 50000);
Expand Down

0 comments on commit 2f68587

Please sign in to comment.