Lines Matching +full:over +full:- +full:current +full:- +full:scale +full:- +full:factor

1 /*-
2 * SPDX-License-Identifier: BSD-3-Clause
83 * Constants for averages over 1, 5, and 15 minutes
87 0.9200444146293232 * FSCALE, /* exp(-1/12) */
88 0.9834714538216174 * FSCALE, /* exp(-1/60) */
89 0.9944598480048967 * FSCALE, /* exp(-1/180) */
94 "Fixed-point scale factor used for calculating load average values");
116 * General sleep call. Suspends the current thread until a wakeup is
122 * signal becomes pending, ERESTART is returned if the current system
127 * re-locked before _sleep() returns. If priority includes the PDROP
128 * flag the lock is not re-locked before returning.
155 ("PDROP requires a non-Giant lock"));
163 class->lc_unlock(lock);
172 (uintptr_t)ident <= (uintptr_t)&pause_wchan[MAXCPU - 1])
181 td->td_tid, td->td_proc->p_pid, td->td_name, wmesg, ident);
187 !(class->lc_flags & LC_SLEEPABLE)) {
188 KASSERT(!(class->lc_flags & LC_SPINLOCK),
191 lock_state = class->lc_unlock(lock);
194 lock_state = -1;
208 if (lock != NULL && class->lc_flags & LC_SLEEPABLE) {
211 lock_state = class->lc_unlock(lock);
230 class->lc_lock(lock, lock_state);
255 td->td_tid, td->td_proc->p_pid, td->td_name, wmesg, ident);
259 WITNESS_SAVE(&mtx->lock_object, mtx);
265 sleepq_add(ident, &mtx->lock_object, wmesg, SLEEPQ_SLEEP, 0);
301 WITNESS_RESTORE(&mtx->lock_object, mtx);
329 sbt -= SBT_1S;
381 if (atomic_cmpset_int(&bc->__count, _BLOCKCOUNT_WAITERS_FLAG, 0))
418 if (atomic_load_acq_int(&bc->__count) == 0) {
420 LOCK_CLASS(lock)->lc_unlock(lock);
428 lock_state = LOCK_CLASS(lock)->lc_unlock(lock);
438 } while (!atomic_fcmpset_int(&bc->__count, &old,
451 LOCK_CLASS(lock)->lc_lock(lock, lock_state);
466 * mi_switch(9): The machine-independent parts of context switching.
484 KASSERT(td->td_critnest == 1 || KERNEL_PANICKED(),
501 td->td_ru.ru_nvcsw++;
502 td->td_swvoltick = ticks;
504 td->td_ru.ru_nivcsw++;
505 td->td_swinvoltick = ticks;
511 * Compute the amount of time during which the current
515 runtime = new_switchtime - PCPU_GET(switchtime);
516 td->td_runtime += runtime;
517 td->td_incruntime += runtime;
519 td->td_generation++; /* bump preempt-detect counter */
523 td->td_tid, td_get_sched(td), td->td_proc->p_pid, td->td_name);
532 td->td_tid, td_get_sched(td), td->td_proc->p_pid, td->td_name);
553 KASSERT(td->td_proc->p_state != PRS_ZOMBIE,
554 ("setrunnable: pid %d is a zombie", td->td_proc->p_pid));
564 KASSERT((td->td_flags & TDF_INMEM) != 0,
566 td, td->td_flags, td->td_inhibitors));
590 avg->ldavg[i] = (cexp[i] * (uint64_t)avg->ldavg[i] +
591 nrun * FSCALE * (FSCALE - cexp[i])) >> FSHIFT;
611 sched_prio(td, td->td_user_pri);
633 return ((u_int)ticks - (u_int)curthread->td_swvoltick >= hogticks);
653 prio = td->td_user_pri;
668 if (PRI_BASE(td->td_pri_class) == PRI_TIMESHARE)
671 td->td_retval[0] = 0;
678 td->td_retval[0] = td->td_oncpu;