Lines Matching refs:child
252 * Delete any ancestors of given child lgroup which don't have any other
256 lgrp_ancestor_delete(lgrp_t *child, klgrpset_t *changed)
266 (void *)child, child->lgrp_id, (void *)changed);
275 * Visit ancestors, decrement child count for each, and remove any
279 current = child;
280 parent = child->lgrp_parent;
329 lgrp_t *child;
380 child = lgrp_table[i];
381 if (!LGRP_EXISTS(child))
387 child->lgrp_id, lgrp2->lgrp_id);
389 klgrpset_or(lgrp2->lgrp_leaves, child->lgrp_leaves);
390 klgrpset_add(lgrp2->lgrp_children, child->lgrp_id);
392 child->lgrp_parent = lgrp2;
394 klgrpset_add(*changed, child->lgrp_id);
403 child = lgrp2;
404 parent = child->lgrp_parent;
406 klgrpset_or(parent->lgrp_leaves, child->lgrp_leaves);
410 child = parent;
544 * specified child lgroup, and insert it into hierarchy
547 lgrp_new_parent(lgrp_t *child, int latency, klgrpset_t *rset,
568 old = child->lgrp_parent;
570 klgrpset_add(new->lgrp_children, child->lgrp_id);
572 klgrpset_add(new->lgrp_children, child->lgrp_id);
573 klgrpset_copy(new->lgrp_leaves, child->lgrp_leaves);
575 child->lgrp_parent = new;
577 klgrpset_del(old->lgrp_children, child->lgrp_id);
585 klgrpset_add(*changed, child->lgrp_id);
601 * Proprogate resources of new leaf into parent lgroup of given child
604 lgrp_proprogate(lgrp_t *newleaf, lgrp_t *child, int latency,
614 if (child == NULL || child->lgrp_parent == NULL)
617 parent = child->lgrp_parent;
618 klgrpset_or(parent->lgrp_leaves, child->lgrp_leaves);
645 "latency %d, child %d(0x%p), parent %d(0x%p)\n",
646 newleaf->lgrp_id, (void *)newleaf, latency, child->lgrp_id,
647 (void *)child, parent->lgrp_id, (void *)parent);
668 * Split parent lgroup of given child if child's leaf decendant (oldleaf) has
670 * child's siblings
673 lgrp_split(lgrp_t *oldleaf, lgrp_t *newleaf, lgrp_t *child,
686 if (lgrp_split_off || newleaf == NULL || child == NULL)
690 * Parent must have more than one child to have a child split from it
693 parent = child->lgrp_parent;
702 (void *)child, child->lgrp_id, (void *)changed);
713 * Check whether all sibling leaves of given child lgroup have same
747 * Different latencies, so remove child from its parent and
752 klgrpset_del(parent->lgrp_children, child->lgrp_id);
758 child->lgrp_id);
763 child->lgrp_parent = grandparent;
765 count += lgrp_new_parent(child, parent->lgrp_latency,
771 klgrpset_add(*changed, child->lgrp_id);
775 parent = child->lgrp_parent;
781 child->lgrp_id, (void *)child);
837 lgrp_t *child;
888 child = oldleaf;
889 parent = child->lgrp_parent;
905 prom_printf("lgrp_lineage_add: child %d (0x%p), parent"
907 child->lgrp_id, (void *)child,
920 count = lgrp_split(oldleaf, newleaf, child, &changes);
925 " for child %d from %d to %d\n",
926 child->lgrp_id, parent->lgrp_id,
927 child->lgrp_parent->lgrp_id);
929 parent = child->lgrp_parent;
941 total += lgrp_proprogate(newleaf, child, latency,
946 parent = child->lgrp_parent;
948 child = parent;
969 * child and parent
979 * between child and parent
981 lgrp_rsets_copy(child->lgrp_set, rset);
1004 total += lgrp_proprogate(newleaf, child,
1015 child->lgrp_id);
1024 * leaf + child resources since new leaf is
1039 (void *)child, latency);
1044 total += lgrp_new_parent(child, latency, rset,
1046 intermed = child->lgrp_parent;
1050 child = intermed;
1057 (void *)intermed, child->lgrp_id);
1082 total += lgrp_proprogate(newleaf, child, latency,
1084 parent = child->lgrp_parent;
1092 child = parent;