Lines Matching refs:weight

167 	lw->weight += inc;
173 lw->weight -= dec;
179 lw->weight = w;
238 w = scale_load_down(lw->weight);
249 * delta_exec * weight / lw.weight
251 * (delta_exec * (weight * lw->inv_weight)) >> WMULT_SHIFT
253 * Either weight := NICE_0_LOAD and lw \e sched_prio_to_wmult[], in which case
257 * Or, weight =< lw.weight (because lw.weight is the runqueue weight), thus
258 * weight/lw.weight <= 1, and therefore our shift will also be positive.
260 static u64 __calc_delta(u64 delta_exec, unsigned long weight, struct load_weight *lw)
262 u64 fact = scale_load_down(weight);
292 if (unlikely(se->load.weight != NICE_0_LOAD))
619 * As measured, the max (key * weight) value was ~44 bits for a kernel build.
624 unsigned long weight = scale_load_down(se->load.weight);
627 cfs_rq->avg_vruntime += key * weight;
628 cfs_rq->avg_load += weight;
634 unsigned long weight = scale_load_down(se->load.weight);
637 cfs_rq->avg_vruntime -= key * weight;
638 cfs_rq->avg_load -= weight;
661 unsigned long weight = scale_load_down(curr->load.weight);
663 avg += entity_key(cfs_rq, curr) * weight;
664 load += weight;
734 unsigned long weight = scale_load_down(curr->load.weight);
736 avg += entity_key(cfs_rq, curr) * weight;
737 load += weight;
1025 sa->load_avg = scale_load_down(se->load.weight);
1034 * util_avg = cfs_rq->util_avg / (cfs_rq->load_avg + 1) * se.load.weight
1081 sa->util_avg = cfs_rq->avg.util_avg * se->load.weight;
1669 * task group, on a particular numa node. The group weight is given a
1962 unsigned int weight;
1991 if ((ns->nr_running > ns->weight) &&
1996 if ((ns->nr_running < ns->weight) ||
2067 ns->weight = cpumask_weight(cpumask_of_node(nid));
2246 * (not part of a group), use the task weight instead.
3578 update_load_add(&cfs_rq->load, se->load.weight);
3595 update_load_sub(&cfs_rq->load, se->load.weight);
3680 unsigned long weight)
3682 unsigned long old_weight = se->load.weight;
3690 * adjusted if re-weight at !0-lag point.
3693 * re-weight without changing vruntime at !0-lag point.
3699 * Since lag needs to be preserved through re-weight:
3704 * Let W be the total weight of the entities before reweight,
3722 * ==> W = w (re-weight indicates w' != w)
3726 * average vruntime @V, which means we will always re-weight
3730 * COROLLARY #2: Re-weight does NOT affect weighted average
3754 * So according to corollary #1 & #2, the effect of re-weight
3764 vlag = div_s64(vlag * old_weight, weight);
3772 * When the weight changes, the virtual time slope changes and
3781 vslice = div_s64(vslice * old_weight, weight);
3786 unsigned long weight)
3797 update_load_sub(&cfs_rq->load, se->load.weight);
3802 reweight_eevdf(se, avruntime, weight);
3808 se->vlag = div_s64(se->vlag * se->load.weight, weight);
3811 update_load_set(&se->load, weight);
3823 update_load_add(&cfs_rq->load, se->load.weight);
3843 unsigned long weight = scale_load(sched_prio_to_weight[prio]);
3845 reweight_entity(cfs_rq, se, weight);
3857 * That is, the weight of a group entity, is the proportional share of the
3858 * group weight based on the group runqueue weights. That is:
3860 * tg->weight * grq->load.weight
3861 * ge->load.weight = ----------------------------- (1)
3862 * \Sum grq->load.weight
3870 * grq->load.weight -> grq->avg.load_avg (2)
3874 * tg->weight * grq->avg.load_avg
3875 * ge->load.weight = ------------------------------ (3)
3890 * tg->weight * grq->load.weight
3891 * ge->load.weight = ----------------------------- = tg->weight (4)
3892 * grp->load.weight
3899 * ge->load.weight =
3901 * tg->weight * grq->load.weight
3903 * tg->load_avg - grq->avg.load_avg + grq->load.weight
3905 * But because grq->load.weight can drop to 0, resulting in a divide by zero,
3909 * tg->weight * grq->load.weight
3910 * ge->load.weight = ----------------------------- (6)
3916 * max(grq->load.weight, grq->avg.load_avg)
3920 * overestimates the ge->load.weight and therefore:
3922 * \Sum ge->load.weight >= tg->weight
3933 load = max(scale_load_down(cfs_rq->load.weight), cfs_rq->avg.load_avg);
3948 * assigned as a minimum load.weight to the sched_entity representing
3981 if (unlikely(se->load.weight != shares))
4072 if (cfs_rq->load.weight)
4219 * ge->avg.load_avg = ge->load.weight * ge->avg.runnable_avg (2)
4224 * grq->avg.load_avg = grq->load.weight * grq->avg.runnable_avg (3)
4232 * ge->load.weight * grq->avg.load_avg
4234 * grq->load.weight
4238 * Because while for entities historical weight is not important and we
4265 * grq->avg.runnable_sum = grq->avg.load_sum / grq->load.weight
4364 if (scale_load_down(gcfs_rq->load.weight)) {
4366 scale_load_down(gcfs_rq->load.weight));
4955 * Where 'w' is the weight of new samples, which is configured to be
5253 load += scale_load_down(curr->load.weight);
5255 lag *= load + scale_load_down(se->load.weight);
5301 * - For group_entity, update its weight to reflect the new share of
5303 * - Add its new weight to cfs_rq->load.weight
5309 * but update_cfs_group() here will re-adjust the weight and have to
5387 * - Subtract its previous weight from cfs_rq->load.weight.
5388 * - For group entity, update its weight to reflect the new share
5449 * least twice that of our own weight (i.e. don't track it
5450 * when there are only lesser-weight tasks around):
5453 rq_of(cfs_rq)->cfs.load.weight >= 2*se->load.weight) {
5814 if (qcfs_rq->load.weight) {
5876 if (!cfs_rq->load.weight) {
6866 if (cfs_rq->load.weight) {
7050 * wake_affine_weight() - considers the weight to reflect the average
7113 * If sync, adjust the weight of prev_eff_load such that if
7225 int weight;
7247 weight = sd->span_weight;
7250 if (weight <= tmp->span_weight)
8684 * Where W_i,n is the n-th weight average for CPU i. The instantaneous weight
8689 * Where w_i,j is the weight of the j-th runnable task on CPU i. This weight
8692 * The weight average is an exponential decay average of the instantaneous
8693 * weight:
8708 * a few fun cases generally called infeasible weight scenarios.
8782 * w_i,j,k is the weight of the j-th runnable task in the k-th cgroup on CPU i.
13037 /* guarantee group entities always have weight */
13051 * We can't change the weight of the root cgroup.
13157 /* Idle groups have minimum weight. */
13179 if (rq->cfs.load.weight)