Lines Matching defs:lw
171 static inline void update_load_add(struct load_weight *lw, unsigned long inc)
173 lw->weight += inc;
174 lw->inv_weight = 0;
177 static inline void update_load_sub(struct load_weight *lw, unsigned long dec)
179 lw->weight -= dec;
180 lw->inv_weight = 0;
183 static inline void update_load_set(struct load_weight *lw, unsigned long w)
185 lw->weight = w;
186 lw->inv_weight = 0;
239 static void fair_update_inv_weight(struct load_weight *lw)
243 if (likely(lw->inv_weight)) {
247 w = scale_load_down(lw->weight);
249 lw->inv_weight = 1;
251 lw->inv_weight = WMULT_CONST;
253 lw->inv_weight = WMULT_CONST / w;
258 * delta_exec * weight / lw.weight
260 * (delta_exec * (weight * lw->inv_weight)) >> WMULT_SHIFT
262 * Either weight := NICE_0_LOAD and lw \e sched_prio_to_wmult[], in which case
266 * Or, weight =< lw.weight (because lw.weight is the runqueue weight), thus
267 * weight/lw.weight <= 1, and therefore our shift will also be positive.
269 static u64 fair_calc_delta(u64 delta_exec, unsigned long weight, struct load_weight *lw)
274 fair_update_inv_weight(lw);
283 fact = mul_u32_u32(fact, lw->inv_weight);
753 struct load_weight lw;
759 lw = cfs_rq->load;
761 update_load_add(&lw, se->load.weight);
762 load = &lw;