Lines Matching refs:weight

173 	lw->weight += inc;
179 lw->weight -= dec;
185 lw->weight = w;
245 w = scale_load_down(lw->weight);
256 * delta_exec * weight / lw.weight
258 * (delta_exec * (weight * lw->inv_weight)) >> WMULT_SHIFT
260 * Either weight := NICE_0_LOAD and lw \e sched_prio_to_wmult[], in which case
264 * Or, weight =< lw.weight (because lw.weight is the runqueue weight), thus
265 * weight/lw.weight <= 1, and therefore our shift will also be positive.
267 static u64 __calc_delta(u64 delta_exec, unsigned long weight, struct load_weight *lw)
269 u64 fact = scale_load_down(weight);
294 static u64 __calc_delta(u64 delta_exec, unsigned long weight, struct load_weight *lw)
296 return (delta_exec * weight) / lw->weight;
305 if (se->h_load.weight != NICE_0_LOAD)
579 * (disregarding the actual divide-by-weight part makes for the worst case
580 * weight of 2, which nicely cancels vs the fuzz in zero_vruntime not actually
657 unsigned long weight = avg_vruntime_weight(cfs_rq, se->h_load.weight);
660 w_vruntime = key * weight;
664 cfs_rq->sum_weight += weight;
670 unsigned long weight;
674 weight = avg_vruntime_weight(cfs_rq, se->h_load.weight);
677 if (check_mul_overflow(key, weight, &key))
684 cfs_rq->sum_weight += weight;
720 unsigned long weight = avg_vruntime_weight(cfs_rq, se->h_load.weight);
723 cfs_rq->sum_w_vruntime -= key * weight;
724 cfs_rq->sum_weight -= weight;
752 long weight = cfs_rq->sum_weight;
758 if (weight) {
762 unsigned long w = avg_vruntime_weight(cfs_rq, curr->h_load.weight);
765 weight += w;
770 runtime -= (weight - 1);
772 delta = div64_long(runtime, weight);
817 long weight = cfs_rq->sum_weight;
829 if (weight) {
838 runtime -= (weight - 1);
840 delta = div64_long(runtime, weight);
929 unsigned long weight = avg_vruntime_weight(cfs_rq, curr->h_load.weight);
931 avg += entity_key(cfs_rq, curr) * weight;
932 load += weight;
1334 sa->load_avg = scale_load_down(se->load.weight);
2763 * task group, on a particular numa node. The group weight is given a
3055 unsigned int weight;
3084 if ((ns->nr_running > ns->weight) &&
3089 if ((ns->nr_running < ns->weight) ||
3153 ns->weight = cpumask_weight(cpumask_of_node(nid));
3333 * (not part of a group), use the task weight instead.
4721 update_load_add(&cfs_rq->load, se->load.weight);
4737 update_load_sub(&cfs_rq->load, se->load.weight);
4816 rescale_entity(struct sched_entity *se, unsigned long weight, bool rel_vprot)
4818 long old_weight = se->h_load.weight;
4825 * adjusted if re-weight at !0-lag point.
4828 * re-weight without changing vruntime at !0-lag point.
4834 * Since lag needs to be preserved through re-weight:
4839 * Let W be the total weight of the entities before reweight,
4857 * ==> W = w (re-weight indicates w' != w)
4861 * average vruntime @V, which means we will always re-weight
4865 * COROLLARY #2: Re-weight does NOT affect weighted average
4889 * So according to corollary #1 & #2, the effect of re-weight
4897 se->vlag = div64_long(se->vlag * old_weight, weight);
4903 * When the weight changes, the virtual time slope changes and
4912 se->deadline = div64_long(se->deadline * old_weight, weight);
4915 se->vprot = div64_long(se->vprot * old_weight, weight);
4919 unsigned long weight, bool on_rq)
4925 if (se->h_load.weight == weight)
4943 rescale_entity(se, weight, rel_vprot);
4945 update_load_set(&se->h_load, weight);
4961 unsigned long weight)
4963 if (se->load.weight == weight)
4968 update_load_sub(&cfs_rq->load, se->load.weight);
4972 update_load_set(&se->load, weight);
4982 update_load_add(&cfs_rq->load, se->load.weight);
4986 * weight = NICE_0_LOAD;
4988 * weight = __calc_prop_weight(cfs_rq_of(se), se, weight);
4992 unsigned long weight)
4994 weight *= se->load.weight;
4996 weight /= cfs_rq->load.weight;
4998 weight /= NICE_0_LOAD;
5000 return max(weight, MIN_SHARES);
5007 unsigned long weight = NICE_0_LOAD;
5012 reweight_entity(cfs_rq_of(se), se, lw->weight);
5019 weight = __calc_prop_weight(cfs_rq_of(se), se, weight);
5021 reweight_eevdf(&rq->cfs, &p->se, weight, p->se.on_rq);
5031 * That is, the weight of a group entity, is the proportional share of the
5032 * group weight based on the group runqueue weights. That is:
5034 * tg->weight * grq->load.weight
5035 * ge->load.weight = ----------------------------- (1)
5036 * \Sum grq->load.weight
5044 * grq->load.weight -> grq->avg.load_avg (2)
5048 * tg->weight * grq->avg.load_avg
5049 * ge->load.weight = ------------------------------ (3)
5064 * tg->weight * grq->load.weight
5065 * ge->load.weight = ----------------------------- = tg->weight (4)
5066 * grp->load.weight
5073 * ge->load.weight =
5075 * tg->weight * grq->load.weight
5077 * tg->load_avg - grq->avg.load_avg + grq->load.weight
5079 * But because grq->load.weight can drop to 0, resulting in a divide by zero,
5083 * tg->weight * grq->load.weight
5084 * ge->load.weight = ----------------------------- (6)
5090 * max(grq->load.weight, grq->avg.load_avg)
5094 * overestimates the ge->load.weight and therefore:
5096 * \Sum ge->load.weight >= tg->weight
5105 load = max(scale_load_down(cfs_rq->load.weight), cfs_rq->avg.load_avg);
5120 * assigned as a minimum load.weight to the sched_entity representing
5255 * When a group becomes empty, preserve its weight. This matters for
5258 if (!gcfs_rq || !gcfs_rq->load.weight)
5353 if (cfs_rq->load.weight)
5510 * ge->avg.load_avg = ge->load.weight * ge->avg.runnable_avg (2)
5515 * grq->avg.load_avg = grq->load.weight * grq->avg.runnable_avg (3)
5523 * ge->load.weight * grq->avg.load_avg
5525 * grq->load.weight
5529 * Because while for entities historical weight is not important and we
5556 * grq->avg.runnable_sum = grq->avg.load_sum / grq->load.weight
5646 if (scale_load_down(gcfs_rq->load.weight)) {
5648 scale_load_down(gcfs_rq->load.weight));
6034 * Where 'w' is the weight of new samples, which is configured to be
6407 long load, weight;
6465 load += avg_vruntime_weight(cfs_rq, curr->h_load.weight);
6467 weight = avg_vruntime_weight(cfs_rq, se->h_load.weight);
6468 lag *= load + weight;
6493 if (weight > load)
6533 * - For group_entity, update its weight to reflect the new share of
6535 * - Add its new weight to cfs_rq->load.weight
6541 * but update_cfs_group() here will re-adjust the weight and have to
6664 * - Subtract its previous weight from cfs_rq->load.weight.
6665 * - For group entity, update its weight to reflect the new share
6715 * least twice that of our own weight (i.e. don't track it
6716 * when there are only lesser-weight tasks around):
6719 rq_of(cfs_rq)->cfs.load.weight >= 2*se->load.weight) {
7304 if (!cfs_rq->load.weight) {
8027 delta = (se->h_load.weight * vdelta) / NICE_0_LOAD;
8153 unsigned long weight = NICE_0_LOAD;
8182 weight = __calc_prop_weight(cfs_rq, se, weight);
8187 return weight;
8211 unsigned long weight;
8251 weight = enqueue_hierarchy(p, flags);
8254 reweight_eevdf(cfs_rq, se, weight, false);
8308 if (cfs_rq->load.weight)
8569 * wake_affine_weight() - considers the weight to reflect the average
8636 * If sync, adjust the weight of prev_eff_load such that if
8748 int weight;
8770 weight = sd->span_weight;
8773 if (weight <= tmp->span_weight)
10436 * Where W_i,n is the n-th weight average for CPU i. The instantaneous weight
10441 * Where w_i,j is the weight of the j-th runnable task on CPU i. This weight
10444 * The weight average is an exponential decay average of the instantaneous
10445 * weight:
10460 * a few fun cases generally called infeasible weight scenarios.
10534 * w_i,j,k is the weight of the j-th runnable task in the k-th cgroup on CPU i.
14919 unsigned int weight = 1;
14928 weight = 1 + sd->newidle_ratio;
14929 if (d1k > weight) {
14933 weight = (1024 + weight/2) / weight;
14949 update_newidle_cost(sd, domain_cost, weight * !!pulled_task);
15092 * Consider any infeasible weight scenario. Take for instance two tasks,
15093 * each bound to their respective sibling, one with weight 1 and one with
15094 * weight 2. Then the lower weight task will run ahead of the higher weight
15244 * such thing in infeasible weight scenarios.
15337 unsigned long weight = NICE_0_LOAD;
15344 weight = __calc_prop_weight(cfs_rq, se, weight);
15348 reweight_eevdf(cfs_rq, se, weight, se->on_rq);
15522 unsigned long weight = NICE_0_LOAD;
15541 weight = __calc_prop_weight(cfs_rq, se, weight);
15551 reweight_eevdf(cfs_rq, se, weight, se->on_rq);
15704 /* guarantee group entities always have weight */
15718 * We can't change the weight of the root cgroup.
15816 /* Idle groups have minimum weight. */
15838 if (rq->cfs.load.weight)