/linux/net/netfilter/ipvs/ |
H A D | ip_vs_twos.c | 28 * decrement rweight1 and rweight2 by the destination weight 33 * by weight 50 int overhead2, total_weight = 0, weight; in ip_vs_twos_schedule() local 54 /* Generate a random weight between [0,sum of all weights) */ in ip_vs_twos_schedule() 57 weight = atomic_read(&dest->weight); in ip_vs_twos_schedule() 58 if (weight > 0) { in ip_vs_twos_schedule() 59 total_weight += weight; in ip_vs_twos_schedule() 82 weight = atomic_read(&dest->weight); in ip_vs_twos_schedule() [all...] |
H A D | ip_vs_wrr.c | 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 t 72 int weight; ip_vs_wrr_gcd_weight() local 94 int new_weight, weight = 0; ip_vs_wrr_max_weight() local [all...] |
H A D | ip_vs_wlc.c | 14 * Wensong Zhang : added any dest with weight=0 is quiesced 39 * (dest overhead) / dest->weight in ip_vs_wlc_schedule() 44 * if every weight is larger than zero. in ip_vs_wlc_schedule() 46 * The server with weight=0 is quiesced and will not receive any in ip_vs_wlc_schedule() 52 atomic_read(&dest->weight) > 0) { in ip_vs_wlc_schedule() 69 if ((__s64)loh * atomic_read(&dest->weight) > in ip_vs_wlc_schedule() 70 (__s64)doh * atomic_read(&least->weight)) { in ip_vs_wlc_schedule() 77 "activeconns %d refcnt %d weight %d overhead %d\n", in ip_vs_wlc_schedule() 82 atomic_read(&least->weight), loh); in ip_vs_wlc_schedule()
|
H A D | ip_vs_nq.c | 63 * (server expected overhead) / dest->weight in ip_vs_nq_schedule() 68 * if every weight is larger than zero. in ip_vs_nq_schedule() 70 * The server with weight=0 is quiesced and will not receive any in ip_vs_nq_schedule() 77 !atomic_read(&dest->weight)) in ip_vs_nq_schedule() 90 ((__s64)loh * atomic_read(&dest->weight) > in ip_vs_nq_schedule() 91 (__s64)doh * atomic_read(&least->weight))) { in ip_vs_nq_schedule() 104 "activeconns %d refcnt %d weight %d overhead %d\n", in ip_vs_nq_schedule() 109 atomic_read(&least->weight), loh); in ip_vs_nq_schedule()
|
H A D | ip_vs_lblcr.c | 8 * Julian Anastasov : Added the missing (dest->weight>0) 20 * (n.conns>n.weight AND 21 * there is a node m with m.conns<m.weight/2) then 167 /* select the first destination server, whose weight > 0 */ in ip_vs_dest_set_min() 173 if ((atomic_read(&least->weight) > 0) in ip_vs_dest_set_min() 189 if (((__s64)loh * atomic_read(&dest->weight) > in ip_vs_dest_set_min() 190 (__s64)doh * atomic_read(&least->weight)) in ip_vs_dest_set_min() 198 "activeconns %d refcnt %d weight %d overhead %d\n", in ip_vs_dest_set_min() 204 atomic_read(&least->weight), loh); in ip_vs_dest_set_min() 219 /* select the first destination server, whose weight > in ip_vs_dest_set_max() [all...] |
H A D | ip_vs_sed.c | 14 * jobs on the ith server and Ui is the fixed service rate (weight) of 29 * (the server weight varies a lot). 67 * (server expected overhead) / dest->weight in ip_vs_sed_schedule() 72 * if every weight is larger than zero. in ip_vs_sed_schedule() 74 * The server with weight=0 is quiesced and will not receive any in ip_vs_sed_schedule() 80 atomic_read(&dest->weight) > 0) { in ip_vs_sed_schedule() 97 if ((__s64)loh * atomic_read(&dest->weight) > in ip_vs_sed_schedule() 98 (__s64)doh * atomic_read(&least->weight)) { in ip_vs_sed_schedule() 105 "activeconns %d refcnt %d weight %d overhead %d\n", in ip_vs_sed_schedule() 110 atomic_read(&least->weight), lo in ip_vs_sed_schedule() [all...] |
H A D | ip_vs_mh.c | 46 int turns; /* weight / gcd() and rshift */ 83 return atomic_read(&dest->weight) <= 0 || in is_unavailable() 190 /* Ignore added server with zero weight */ in ip_vs_mh_populate() 325 int weight; in ip_vs_mh_gcd_weight() local 329 weight = atomic_read(&dest->last_weight); in ip_vs_mh_gcd_weight() 330 if (weight > 0) { in ip_vs_mh_gcd_weight() 332 g = gcd(weight, g); in ip_vs_mh_gcd_weight() 334 g = weight; in ip_vs_mh_gcd_weight() 340 /* To avoid assigning huge weight for the MH table, 346 int new_weight, weight in ip_vs_mh_shift_weight() local [all...] |
H A D | ip_vs_lblc.c | 27 * (n.conns>n.weight AND 28 * there is a node m with m.conns<m.weight/2) then 407 * (dest overhead) / dest->weight in __ip_vs_lblc_schedule() 412 * if every weight is larger than zero. in __ip_vs_lblc_schedule() 414 * The server with weight=0 is quiesced and will not receive any in __ip_vs_lblc_schedule() 420 if (atomic_read(&dest->weight) > 0) { in __ip_vs_lblc_schedule() 437 if ((__s64)loh * atomic_read(&dest->weight) > in __ip_vs_lblc_schedule() 438 (__s64)doh * atomic_read(&least->weight)) { in __ip_vs_lblc_schedule() 445 "activeconns %d refcnt %d weight %d overhead %d\n", in __ip_vs_lblc_schedule() 450 atomic_read(&least->weight), lo in __ip_vs_lblc_schedule() [all...] |
/linux/fs/bcachefs/ |
H A D | mean_and_variance.c | 24 * Create a struct and if it's the weighted variant set the w field (weight = 2^k). 34 * DO NOT change the weight after calling update. 107 * @weight: ewma weight 113 s64 x, bool initted, u8 weight) in mean_and_variance_weighted_update() argument 116 u8 w = weight; in mean_and_variance_weighted_update() 138 * @weight: ewma weight 141 u8 weight) in mean_and_variance_weighted_get_mean() argument 143 return fast_divpow2(s.mean, weight); in mean_and_variance_weighted_get_mean() 153 mean_and_variance_weighted_get_variance(struct mean_and_variance_weighted s,u8 weight) mean_and_variance_weighted_get_variance() argument 166 mean_and_variance_weighted_get_stddev(struct mean_and_variance_weighted s,u8 weight) mean_and_variance_weighted_get_stddev() argument [all...] |
H A D | mean_and_variance_test.c | 93 unsigned weight, in do_mean_and_variance_test() argument 105 mean_and_variance_weighted_update(&vw, initial_value, false, weight); in do_mean_and_variance_test() 109 KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(vw, weight), initial_value); in do_mean_and_variance_test() 110 KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_stddev(vw, weight),0); in do_mean_and_variance_test() 115 mean_and_variance_weighted_update(&vw, data[i], true, weight); in do_mean_and_variance_test() 119 KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_mean(vw, weight), weighted_mean[i]); in do_mean_and_variance_test() 120 KUNIT_EXPECT_EQ(test, mean_and_variance_weighted_get_stddev(vw, weight),weighted_stddev[i]); in do_mean_and_variance_test()
|
H A D | mean_and_variance.h | 194 s64 v, bool initted, u8 weight); 197 u8 weight); 199 u8 weight); 201 u8 weight);
|
/linux/lib/ |
H A D | irq_poll.c | 88 int work, weight; in irq_poll_softirq() local 107 weight = iop->weight; in irq_poll_softirq() 110 work = iop->poll(iop, weight); in irq_poll_softirq() 118 * consume their assigned weight (or more, some drivers can't in irq_poll_softirq() 124 if (work >= weight) { in irq_poll_softirq() 173 * @weight: The default weight (or command completion budget) 179 void irq_poll_init(struct irq_poll *iop, int weight, irq_poll_fn *poll_fn) in irq_poll_init() argument 183 iop->weight in irq_poll_init() [all...] |
/linux/drivers/gpu/drm/ingenic/ |
H A D | ingenic-ipu.c | 45 unsigned int weight, unsigned int offset); 146 * On entry, "weight" is a coefficient suitable for bilinear mode, 149 * "weight 512" means all of pixel 0; 150 * "weight 256" means half of pixel 0 and half of pixel 1; 151 * "weight 0" means all of pixel 1; 157 unsigned int weight, unsigned int offset) in jz4760_set_coefs() argument 162 weight = clamp_val(weight, 0, 512); in jz4760_set_coefs() 171 weight = weight > in jz4760_set_coefs() 209 jz4725b_set_coefs(struct ingenic_ipu * ipu,unsigned int reg,unsigned int sharpness,bool downscale,unsigned int weight,unsigned int offset) jz4725b_set_coefs() argument 236 unsigned int i, offset, weight, weight_num = denom; ingenic_ipu_set_downscale_coefs() local 268 unsigned int i, offset, weight, weight_num = 0; ingenic_ipu_set_upscale_coefs() local [all...] |
/linux/drivers/net/can/dev/ |
H A D | rx-offload.c | 354 unsigned int weight) in can_rx_offload_init_queue() argument 358 /* Limit queue len to 4x the weight (rounded to next power of two) */ in can_rx_offload_init_queue() 359 offload->skb_queue_len_max = 2 << fls(weight); in can_rx_offload_init_queue() 365 weight); in can_rx_offload_init_queue() 376 unsigned int weight; in can_rx_offload_add_timestamp() local 384 weight = offload->mb_last - offload->mb_first; in can_rx_offload_add_timestamp() 387 weight = offload->mb_first - offload->mb_last; in can_rx_offload_add_timestamp() 390 return can_rx_offload_init_queue(dev, offload, weight); in can_rx_offload_add_timestamp() 395 struct can_rx_offload *offload, unsigned int weight) in can_rx_offload_add_fifo() argument 400 return can_rx_offload_init_queue(dev, offload, weight); in can_rx_offload_add_fifo() 406 can_rx_offload_add_manual(struct net_device * dev,struct can_rx_offload * offload,unsigned int weight) can_rx_offload_add_manual() argument [all...] |
/linux/Documentation/ABI/testing/ |
H A D | sysfs-kernel-mm-mempolicy-weighted-interleave | 11 The interleave weight for a memory node (N). These weights are 18 The minimum weight for a node is always 1. 20 Minimum weight: 1 21 Maximum weight: 255 26 Changing the weight to a valid value will automatically 46 a default weight of 1. 53 Writing a new weight to a node directly via the nodeN interface
|
H A D | sysfs-class-firmware | 4 Contact: Russ Weight <russ.weight@linux.dev> 16 Contact: Russ Weight <russ.weight@linux.dev> 26 Contact: Russ Weight <russ.weight@linux.dev> 40 Contact: Russ Weight <russ.weight@linux.dev> 52 Contact: Russ Weight <russ.weight@linux.dev> 65 Contact: Russ Weight <russ.weight@linux.dev> 73 Contact: Russ Weight <russ.weight@linux.dev>
|
/linux/drivers/net/ethernet/marvell/octeontx2/nic/ |
H A D | cn10k.h | 15 u32 weight; in mtu_to_dwrr_weight() local 20 weight = mtu / pfvf->hw.dwrr_mtu; in mtu_to_dwrr_weight() 22 weight += 1; in mtu_to_dwrr_weight() 24 return weight; in mtu_to_dwrr_weight()
|
/linux/kernel/events/ |
H A D | hw_breakpoint.c | 409 toggle_bp_slot(struct perf_event *bp, bool enable, enum bp_type_idx type, int weight) in toggle_bp_slot() argument 414 weight = -weight; in toggle_bp_slot() 424 bp_slots_histogram_add(&cpu_pinned[type], info->cpu_pinned, weight); in toggle_bp_slot() 425 info->cpu_pinned += weight; in toggle_bp_slot() 478 bp_slots_histogram_add(&tsk_pinned_all[type], next_tsk_pinned, weight); in toggle_bp_slot() 487 next_tsk_pinned, weight); in toggle_bp_slot() 494 next_tsk_pinned + hw_breakpoint_weight(bp), weight); in toggle_bp_slot() 511 next_tsk_pinned, weight); in toggle_bp_slot() 576 int weight; in __reserve_bp_slot() local 610 int weight; __release_bp_slot() local [all...] |
/linux/drivers/dma/qcom/ |
H A D | hidma_mgmt.c | 104 if (mgmtdev->weight[i] > HIDMA_MAX_CHANNEL_WEIGHT) { in hidma_mgmt_setup() 106 "max value of weight can be %d.\n", in hidma_mgmt_setup() 111 /* weight needs to be at least one */ in hidma_mgmt_setup() 112 if (mgmtdev->weight[i] == 0) in hidma_mgmt_setup() 113 mgmtdev->weight[i] = 1; in hidma_mgmt_setup() 137 u32 weight = mgmtdev->weight[i]; in hidma_mgmt_setup() local 144 val |= (weight & HIDMA_WEIGHT_MASK) << HIDMA_WRR_BIT_POS; in hidma_mgmt_setup() 277 mgmtdev->weight = devm_kcalloc(&pdev->dev, in hidma_mgmt_probe() 279 sizeof(*mgmtdev->weight), GFP_KERNE in hidma_mgmt_probe() [all...] |
/linux/tools/sched_ext/ |
H A D | scx_qmap.bpf.c | 6 * assigned to one depending on its compound weight. Each CPU round robins 179 static int weight_to_idx(u32 weight) in weight_to_idx() argument 181 /* Coarsely map the compound weight to a FIFO. */ in weight_to_idx() 182 if (weight <= 25) in weight_to_idx() 184 else if (weight <= 50) in weight_to_idx() 186 else if (weight < 200) in weight_to_idx() 188 else if (weight < 400) in weight_to_idx() 199 int idx = weight_to_idx(p->scx.weight); in BPF_STRUCT_OPS() 269 if (highpri_boosting && p->scx.weight >= HIGHPRI_WEIGHT) { in BPF_STRUCT_OPS() 289 int idx = weight_to_idx(p->scx.weight); in update_core_sched_head_seq() 626 BPF_STRUCT_OPS(qmap_cgroup_set_weight,struct cgroup * cgrp,u32 weight) BPF_STRUCT_OPS() argument [all...] |
H A D | scx_flatcg.bpf.c | 4 * hierarchical weight-based cgroup CPU control by flattening the cgroup 5 * hierarchy into a single layer by compounding the active weight share at each 32 * apache instances competing with 2:1 weight ratio nested four level deep. 132 /* gets inc'd on weight tree changes to expire the cached hweights */ 237 div_round_up(pcgc->hweight * cgc->weight, in cgrp_refresh_hweight() 412 * Walk the cgroup tree to update the active weight sums as tasks wake up and 413 * sleep. The weight sums are used as the base when calculating the proportion a 445 * it's added to the weight tree so that enqueue has the up-to-date in update_active_weight_sums() 447 * refreshed before it's removed from the weight tree so that the usage in update_active_weight_sums() 470 * against weight change in update_active_weight_sums() 586 BPF_STRUCT_OPS(fcg_cgroup_set_weight,struct cgroup * cgrp,u32 weight) BPF_STRUCT_OPS() argument [all...] |
/linux/arch/powerpc/platforms/pseries/ |
H A D | lparcfg.c | 79 u8 weight; member 127 ppp_data->weight = (retbuf[3] >> 5 * 8) & 0xff; in h_get_ppp() 234 seq_printf(m, "capacity_weight=%d\n", ppp_data.weight); in parse_ppp_data() 590 static ssize_t update_ppp(u64 *entitlement, u8 *weight) in update_ppp() argument 603 new_weight = ppp_data.weight; in update_ppp() 605 } else if (weight) { in update_ppp() 606 new_weight = *weight; in update_ppp() 612 __func__, ppp_data.entitlement, ppp_data.weight); in update_ppp() 624 * Update the memory entitlement and weight for the partition. Caller must 625 * specify either a new entitlement or weight, no 628 update_mpp(u64 * entitlement,u8 * weight) update_mpp() argument [all...] |
/linux/drivers/net/wireless/rsi/ |
H A D | rsi_91x_core.c | 24 * the min weight. 38 common->min_weight = tx_qinfo[ii].weight; in rsi_determine_min_weight_queue() 64 tx_qinfo[ii].weight = in rsi_recalculate_weights() 65 ((tx_qinfo[ii].weight > common->min_weight) ? in rsi_recalculate_weights() 66 tx_qinfo[ii].weight - common->min_weight : 0); in rsi_recalculate_weights() 69 tx_qinfo[ii].weight = tx_qinfo[ii].wme_params; in rsi_recalculate_weights() 73 tx_qinfo[ii].weight = 0; in rsi_recalculate_weights() 174 (common->tx_qinfo[ii].weight < common->min_weight)) && in rsi_core_determine_hal_queue() 176 common->min_weight = common->tx_qinfo[ii].weight; in rsi_core_determine_hal_queue()
|
/linux/net/ceph/crush/ |
H A D | mapper.c | 151 dprintk("list_choose i=%d x=%d r=%d item %d weight %x " in bucket_list_choose() 338 dprintk("weight 0x%x item %d\n", weights[i], ids[i]); in bucket_straw2_choose() 356 * divide by 16.16 fixed-point weight. note in bucket_straw2_choose() 358 * weight means a larger (less negative) value in bucket_straw2_choose() 414 const __u32 *weight, int weight_max, in is_out() argument 419 if (weight[item] >= 0x10000) in is_out() 421 if (weight[item] == 0) in is_out() 424 < weight[item]) in is_out() 434 * @weight: weight vecto 456 crush_choose_firstn(const struct crush_map * map,struct crush_work * work,const struct crush_bucket * bucket,const __u32 * weight,int weight_max,int x,int numrep,int type,int * out,int outpos,int out_size,unsigned int tries,unsigned int recurse_tries,unsigned int local_retries,unsigned int local_fallback_retries,int recurse_to_leaf,unsigned int vary_r,unsigned int stable,int * out2,int parent_r,const struct crush_choose_arg * choose_args) crush_choose_firstn() argument 649 crush_choose_indep(const struct crush_map * map,struct crush_work * work,const struct crush_bucket * bucket,const __u32 * weight,int weight_max,int x,int left,int numrep,int type,int * out,int outpos,unsigned int tries,unsigned int recurse_tries,int recurse_to_leaf,int * out2,int parent_r,const struct crush_choose_arg * choose_args) crush_choose_indep() argument 899 crush_do_rule(const struct crush_map * map,int ruleno,int x,int * result,int result_max,const __u32 * weight,int weight_max,void * cwin,const struct crush_choose_arg * choose_args) crush_do_rule() argument [all...] |
/linux/block/ |
H A D | bfq-wf2q.c | 264 * the maximum total weight that can be used for the queues in the system 284 * @weight: scale factor (weight of an entity or weight sum). 286 static u64 bfq_delta(unsigned long service, unsigned long weight) in bfq_delta() argument 288 return div64_ul((u64)service << WFQ_SERVICE_SHIFT, weight); in bfq_delta() 301 bfq_delta(service, entity->weight); in bfq_calc_finish() 306 service, entity->weight); in bfq_calc_finish() 310 bfq_delta(service, entity->weight)); in bfq_calc_finish() 502 * bfq_ioprio_to_weight - calc a weight fro 518 bfq_weight_to_ioprio(int weight) bfq_weight_to_ioprio() argument [all...] |