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

Function tdq_load_rem

freebsd/kern/sched_ule.c:555–569  ·  view source on GitHub ↗

* Remove the load from a thread that is transitioning to a sleep state or * exiting. */

Source from the content-addressed store, hash-verified

553 * exiting.
554 */
555static void
556tdq_load_rem(struct tdq *tdq, struct thread *td)
557{
558
559 TDQ_LOCK_ASSERT(tdq, MA_OWNED);
560 THREAD_LOCK_BLOCKED_ASSERT(td, MA_OWNED);
561 KASSERT(tdq->tdq_load != 0,
562 ("tdq_load_rem: Removing with 0 load on queue %d", TDQ_ID(tdq)));
563
564 tdq->tdq_load--;
565 if ((td->td_flags & TDF_NOLOAD) == 0)
566 tdq->tdq_sysload--;
567 KTR_COUNTER0(KTR_SCHED, "load", tdq->tdq_loadname, tdq->tdq_load);
568 SDT_PROBE2(sched, , , load__change, (int)TDQ_ID(tdq), tdq->tdq_load);
569}
570
571/*
572 * Bound timeshare latency by decreasing slice size as load increases. We

Callers 4

sched_switch_migrateFunction · 0.85
sched_switchFunction · 0.85
sched_remFunction · 0.85
sched_throwFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected