Lines Matching defs:lw
251 static inline void update_load_add(struct load_weight *lw, unsigned long inc)
253 lw->weight += inc;
254 lw->inv_weight = 0;
257 static inline void update_load_sub(struct load_weight *lw, unsigned long dec)
259 lw->weight -= dec;
260 lw->inv_weight = 0;
263 static inline void update_load_set(struct load_weight *lw, unsigned long w)
265 lw->weight = w;
266 lw->inv_weight = 0;
319 static void __update_inv_weight(struct load_weight *lw)
323 if (likely(lw->inv_weight))
326 w = scale_load_down(lw->weight);
329 lw->inv_weight = 1;
331 lw->inv_weight = WMULT_CONST;
333 lw->inv_weight = WMULT_CONST / w;
337 * delta_exec * weight / lw.weight
339 * (delta_exec * (weight * lw->inv_weight)) >> WMULT_SHIFT
341 * Either weight := NICE_0_LOAD and lw \e sched_prio_to_wmult[], in which case
345 * Or, weight =< lw.weight (because lw.weight is the runqueue weight), thus
346 * weight/lw.weight <= 1, and therefore our shift will also be positive.
348 static u64 __calc_delta(u64 delta_exec, unsigned long weight, struct load_weight *lw)
355 __update_inv_weight(lw);
363 fact = mul_u32_u32(fact, lw->inv_weight);