Lines Matching refs:weight
13 * with weight 0 when all weights are zero
28 * - mw: maximum weight
29 * - di: weight step, greatest common divisor from all weights
30 * - cw: current required weight
33 * First, we start with cw = mw and select dests with weight >= cw.
37 * pass 1: cw = max weight
38 * pass 2: cw = max weight - di
39 * pass 3: cw = max weight - 2 * di
44 * weight changes, it is possible some dest weight to be reduced
48 * so that last cw is 1 to catch such dests with weight below di:
49 * pass 1: cw = max weight - (di - 1)
50 * pass 2: cw = max weight - di - (di - 1)
51 * pass 3: cw = max weight - 2 * di - (di - 1)
62 int cw; /* current weight */
63 int mw; /* maximum weight */
72 int weight;
76 weight = atomic_read(&dest->weight);
77 if (weight > 0) {
79 g = gcd(weight, g);
81 g = weight;
89 * Get the maximum weight of the service destinations.
94 int new_weight, weight = 0;
97 new_weight = atomic_read(&dest->weight);
98 if (new_weight > weight)
99 weight = new_weight;
102 return weight;
175 /* Stop only after all dests were checked for weight >= 1 (last pass) */
181 atomic_read(&dest->weight) >= mark->cw)
193 * was for weight >= 1, for all dests.
213 "activeconns %d refcnt %d weight %d\n",
217 atomic_read(&dest->weight));