* Load is maintained for all threads RUNNING and ON_RUNQ. Add the load * for this thread to the referenced thread queue. */
| 535 | * for this thread to the referenced thread queue. |
| 536 | */ |
| 537 | static void |
| 538 | tdq_load_add(struct tdq *tdq, struct thread *td) |
| 539 | { |
| 540 | |
| 541 | TDQ_LOCK_ASSERT(tdq, MA_OWNED); |
| 542 | THREAD_LOCK_BLOCKED_ASSERT(td, MA_OWNED); |
| 543 | |
| 544 | tdq->tdq_load++; |
| 545 | if ((td->td_flags & TDF_NOLOAD) == 0) |
| 546 | tdq->tdq_sysload++; |
| 547 | KTR_COUNTER0(KTR_SCHED, "load", tdq->tdq_loadname, tdq->tdq_load); |
| 548 | SDT_PROBE2(sched, , , load__change, (int)TDQ_ID(tdq), tdq->tdq_load); |
| 549 | } |
| 550 | |
| 551 | /* |
| 552 | * Remove the load from a thread that is transitioning to a sleep state or |
no outgoing calls
no test coverage detected