MCPcopy Create free account
hub / github.com/F-Stack/f-stack / sched_balance

Function sched_balance

freebsd/kern/sched_ule.c:880–891  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

878}
879
880static void
881sched_balance(void)
882{
883 struct tdq *tdq;
884
885 balance_ticks = max(balance_interval / 2, 1) +
886 (sched_random() % balance_interval);
887 tdq = TDQ_SELF();
888 TDQ_UNLOCK(tdq);
889 sched_balance_group(cpu_top);
890 TDQ_LOCK(tdq);
891}
892
893/*
894 * Lock two thread queues using their address to maintain lock order.

Callers 1

sched_clockFunction · 0.85

Calls 3

maxFunction · 0.85
sched_randomFunction · 0.85
sched_balance_groupFunction · 0.85

Tested by

no test coverage detected