Lines Matching refs:cpu
96 fixpt_t ts_pctcpu; /* %cpu during p_swtime. */
97 u_int ts_estcpu; /* Estimated cpu utilization. */
98 int ts_cpticks; /* Ticks of cpu time. */
119 #define THREAD_CAN_SCHED(td, cpu) \
120 CPU_ISSET((cpu), &(td)->td_cpuset->cs_mask)
433 #define decay_cpu(loadfac, cpu) (((loadfac) * (cpu)) / ((loadfac) + FSCALE))
697 * process gets worse as it accumulates CPU time. The cpu usage
701 * cpu usage estimator ramps up quite quickly when the process is
1233 int best, cpu;
1241 CPU_FOREACH(cpu) {
1242 if (!THREAD_CAN_SCHED(td, cpu))
1246 best = cpu;
1247 else if (runq_length[cpu] < runq_length[best])
1248 best = cpu;
1262 u_int cpu, cpuid;
1306 cpu = td->td_lastcpu;
1310 ("sched_add: bound td_sched not on cpu runq"));
1311 cpu = ts->ts_runq - &runq_pcpu[0];
1314 cpu = sched_pickcpu(td);
1315 ts->ts_runq = &runq_pcpu[cpu];
1318 "sched_add: Put td_sched:%p(td:%p) on cpu%d runq", ts, td,
1319 cpu);
1324 cpu = NOCPU;
1331 if (cpu != NOCPU)
1332 runq_length[cpu]++;
1335 if (single_cpu && cpu != cpuid) {
1336 kick_other_cpu(td->td_priority, cpu);
1346 forwarded = forward_wakeup(cpu);
1494 sched_bind(struct thread *td, int cpu)
1505 ts->ts_runq = &runq_pcpu[cpu];
1506 if (PCPU_GET(cpuid) == cpu)
1566 * Calculates the contribution to the thread cpu usage for the latest
1711 int cpu;
1721 CPU_FOREACH(cpu) {
1722 if (!THREAD_CAN_SCHED(td, cpu)) {
1762 ipi_cpu(cpu, IPI_AST);