Lines Matching defs:cpu
211 static void lgrp_cpu_init(struct cpu *);
212 static void lgrp_cpu_fini(struct cpu *, lgrp_id_t);
213 static lgrp_t *lgrp_cpu_to_lgrp(struct cpu *);
225 static void lgrp_part_add_cpu(struct cpu *, lgrp_id_t);
226 static void lgrp_part_del_cpu(struct cpu *);
246 static void lpl_cpu_adjcnt(lpl_act_t, struct cpu *);
704 * Called to add lgrp info into cpu structure from cpu_add_unit;
705 * do not assume cpu is in cpu[] yet!
713 lgrp_cpu_init(struct cpu *cp)
721 struct cpu *cptr;
1028 lgrp_cpu_fini(struct cpu *cp, lgrp_id_t lgrpid)
1031 struct cpu *prev;
1032 struct cpu *next;
1634 * "cpu", and it's lpl from going away across a call to this function.
1638 lgrp_cpu_to_lgrp(cpu_t *cpu)
1640 return (cpu->cpu_lpl->lpl_lgrp);
1651 cpu_t *cpu;
1657 cpu = lgrp->lgrp_cpu;
1660 if (cpu == NULL || ncpu == 0) {
1666 loads += cpu->cpu_lpl->lpl_loadavg;
1667 cpu = cpu->cpu_next_lgrp;
1668 } while (cpu != lgrp->lgrp_cpu);
1972 * Called when we change cpu lpl membership. This increments or decrements the
1973 * per-cpu counter in every lpl in which our leaf appears.
1996 * for the cpu in question, or if the current lgrp and leaf
2080 cpu_t *cpu;
2193 cpu = cp_start = lpl->lpl_cpus;
2194 while (cpu != NULL) {
2197 /* check to make sure cpu's lpl is leaf lpl */
2198 ASSERT(cpu->cpu_lpl == lpl);
2199 if (cpu->cpu_lpl != lpl) {
2203 /* check next cpu */
2204 if ((cpu = cpu->cpu_next_lpl) != cp_start) {
2207 cpu = NULL;
2393 * are necessary to represent the varying states of locality for the cpu
2495 * remaining resources, or no longer name a leaf resource in the cpu-partition,
2531 * based upon lgrp membership but not necessarily cpu-part
2557 * add a cpu to a partition in terms of lgrp load avg bookeeping
2559 * The lpl (cpu partition load average information) is now arranged in a
2561 * the cpu in question are considered to be leaves in a tree of resources.
2562 * There are two general cases for cpu additon:
2566 * all that is necessary is that we link the new cpu into the per-lpl list of
2567 * cpus, and increment the ncpu count of all places where this cpu resource will
2568 * be accounted for. lpl_cpu_adjcnt updates the cpu count, and the cpu pointer
2571 * 2. The lpl to contain the resources in this cpu-partition for this lgrp does
2575 * routine, as is the cpu-partition state for the lgrp membership. This routine
2612 /* link cpu into list of cpus in lpl */
2623 * have any cpu pointers yet.
2633 * remove a cpu from a partition in terms of lgrp load avg bookeeping
2635 * The lpl (cpu partition load average information) is now arranged in a
2637 * the cpu in question are considered to be leaves in a tree of resources.
2641 * that leaf. (Another cpu still exists at this level of locality). In this
2643 * calling lpl_adj_cpucnt(), and the pointer to the removed cpu is pruned
2644 * from the per-cpu lpl list.
2650 * cpu partition in question as no longer containing resources from the lgrp of
2676 * This was the last cpu in this lgroup for this partition,
2681 /* eliminate remaning lpl link pointers in cpu, lpl */
2687 /* unlink cpu from lists of cpus in lpl */
2695 * Update the cpu count in the lpls associated with parent
2701 /* clear cpu's lpl ptr when we're all done */
2711 * runs at highest priority), we know that cpu partitions can not change
2713 * cpu_pause thread to run on this cpu), so we can update the cpu's load
2723 * 1 - exp(-1/(20 * ncpu)) << 13 = 400 for 1 cpu...
2757 * This happens 10 times/sec. per cpu. We do a
2910 * actual lpl array in the default cpu partition.