/linux/net/netfilter/ |
A D | xt_limit.c | 112 || user2credits(r->avg * r->burst) < user2credits(r->avg)) { in limit_mt_check() 114 r->avg, r->burst); in limit_mt_check() 127 priv->credit = user2credits(r->avg * r->burst); /* Credits full. */ in limit_mt_check() 130 r->cost = user2credits(r->avg); in limit_mt_check() 145 u_int32_t avg; member 161 .avg = cm->avg, in limit_mt_compat_from_user() 175 .avg = m->avg, in limit_mt_compat_to_user()
|
A D | xt_hashlimit.c | 145 to->avg = cfg->avg; in cfg_copy() 157 to->avg = cfg->avg; in cfg_copy() 582 user2rate_bytes((u32)hinfo->cfg.avg); in rateinfo_init() 589 dh->rateinfo.rate = user2rate(hinfo->cfg.avg); in rateinfo_init() 599 dh->rateinfo.credit = user2credits(hinfo->cfg.avg * in rateinfo_init() 872 if (cfg->avg == 0 || cfg->avg > U32_MAX) { in hashlimit_mt_check_common() 882 if (user2credits_byte(cfg->avg) == 0) { in hashlimit_mt_check_common() 884 cfg->avg); in hashlimit_mt_check_common() 888 user2credits(cfg->avg * cfg->burst, revision) < in hashlimit_mt_check_common() 889 user2credits(cfg->avg, revision)) { in hashlimit_mt_check_common() [all …]
|
/linux/tools/perf/util/ |
A D | stat-shadow.c | 535 int cpu, double avg, in print_branch_misses() argument 981 ratio = avg / total; in perf_stat__print_shadow_stats() 994 if (total && avg) { in perf_stat__print_shadow_stats() 996 ratio = total / avg; in perf_stat__print_shadow_stats() 1075 ratio = avg / total; in perf_stat__print_shadow_stats() 1094 if (total2 < avg) in perf_stat__print_shadow_stats() 1095 total2 = avg; in perf_stat__print_shadow_stats() 1104 if (avg) in perf_stat__print_shadow_stats() 1105 ratio = total / avg; in perf_stat__print_shadow_stats() 1116 if (avg) in perf_stat__print_shadow_stats() [all …]
|
A D | stat-display.c | 42 double total, double avg) in print_noise_pct() argument 44 double pct = rel_stddev_stats(total, avg); in print_noise_pct() 53 struct evsel *evsel, double avg) in print_noise() argument 835 double avg, avg_enabled, avg_running; member 845 cd->avg += aggr->val; in counter_aggr_cb() 860 struct caggr_data cd = { .avg = 0.0 }; in print_counter_aggr() 868 uval = cd.avg * counter->scale; in print_counter_aggr() 870 cd.avg_enabled, cd.avg, &rt_stat); in print_counter_aggr() 1140 precision, run, precision, run - avg); in print_table() 1187 precision, avg, precision, sd); in print_footer() [all …]
|
/linux/net/bridge/netfilter/ |
A D | ebt_limit.c | 75 user2credits(info->avg * info->burst) < user2credits(info->avg)) { in ebt_limit_mt_check() 77 info->avg, info->burst); in ebt_limit_mt_check() 83 info->credit = user2credits(info->avg * info->burst); in ebt_limit_mt_check() 84 info->credit_cap = user2credits(info->avg * info->burst); in ebt_limit_mt_check() 85 info->cost = user2credits(info->avg); in ebt_limit_mt_check() 96 compat_uint_t avg, burst; member
|
/linux/drivers/mfd/ |
A D | pcf50633-adc.c | 27 int avg; member 54 static void adc_setup(struct pcf50633 *pcf, int channel, int avg) in adc_setup() argument 63 pcf50633_reg_write(pcf, PCF50633_REG_ADCC1, channel | avg | in adc_setup() 77 adc_setup(pcf, adc->queue[head]->mux, adc->queue[head]->avg); in trigger_next_adc_job_if_any() 116 int pcf50633_adc_sync_read(struct pcf50633 *pcf, int mux, int avg) in pcf50633_adc_sync_read() argument 123 ret = pcf50633_adc_async_read(pcf, mux, avg, in pcf50633_adc_sync_read() 134 int pcf50633_adc_async_read(struct pcf50633 *pcf, int mux, int avg, in pcf50633_adc_async_read() argument 146 req->avg = avg; in pcf50633_adc_async_read()
|
/linux/drivers/iio/humidity/ |
A D | hts221_core.c | 177 if (avg->avg_avl[i] == val) in hts221_update_avg() 183 data = ((i << __ffs(avg->mask)) & avg->mask); in hts221_update_avg() 185 avg->mask, data); in hts221_update_avg() 218 for (i = 0; i < ARRAY_SIZE(avg->avg_avl); i++) in hts221_sysfs_rh_oversampling_avail() 220 avg->avg_avl[i]); in hts221_sysfs_rh_oversampling_avail() 237 avg->avg_avl[i]); in hts221_sysfs_temp_oversampling_avail() 447 const struct hts221_avg *avg; in hts221_read_raw() local 451 avg = &hts221_avg_list[HTS221_SENSOR_H]; in hts221_read_raw() 453 *val = avg->avg_avl[idx]; in hts221_read_raw() 457 avg = &hts221_avg_list[HTS221_SENSOR_T]; in hts221_read_raw() [all …]
|
/linux/tools/testing/selftests/kvm/ |
A D | dirty_log_perf_test.c | 43 struct timespec avg; in vcpu_worker() local 81 avg = timespec_div(total, vcpu_last_completed_iteration[vcpu_id]); in vcpu_worker() 84 total.tv_sec, total.tv_nsec, avg.tv_sec, avg.tv_nsec); in vcpu_worker() 180 struct timespec avg; in run_test() local 282 avg = timespec_div(get_dirty_log_total, p->iterations); in run_test() 285 get_dirty_log_total.tv_nsec, avg.tv_sec, avg.tv_nsec); in run_test() 288 avg = timespec_div(clear_dirty_log_total, p->iterations); in run_test() 291 clear_dirty_log_total.tv_nsec, avg.tv_sec, avg.tv_nsec); in run_test()
|
/linux/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/ |
A D | Util.py | 20 def avg(total, n): function 40 min, max, avg, count = dict[key] 45 avg = (avg + value) / 2 46 dict[key] = (min, max, avg, count + 1)
|
/linux/kernel/sched/ |
A D | pelt.h | 40 static inline u32 get_pelt_divider(struct sched_avg *avg) in get_pelt_divider() argument 42 return LOAD_AVG_MAX - 1024 + avg->period_contrib; in get_pelt_divider() 45 static inline void cfs_se_util_change(struct sched_avg *avg) in cfs_se_util_change() argument 53 enqueued = avg->util_est.enqueued; in cfs_se_util_change() 59 WRITE_ONCE(avg->util_est.enqueued, enqueued); in cfs_se_util_change() 116 u32 util_sum = rq->cfs.avg.util_sum; in update_idle_rq_clock_pelt()
|
A D | pelt.c | 301 if (___update_load_sum(now, &se->avg, 0, 0, 0)) { in __update_load_avg_blocked_se() 302 ___update_load_avg(&se->avg, se_weight(se)); in __update_load_avg_blocked_se() 312 if (___update_load_sum(now, &se->avg, !!se->on_rq, se_runnable(se), in __update_load_avg_se() 315 ___update_load_avg(&se->avg, se_weight(se)); in __update_load_avg_se() 316 cfs_se_util_change(&se->avg); in __update_load_avg_se() 326 if (___update_load_sum(now, &cfs_rq->avg, in __update_load_avg_cfs_rq() 331 ___update_load_avg(&cfs_rq->avg, 1); in __update_load_avg_cfs_rq()
|
A D | psi.c | 301 avg[0] = calc_load_n(avg[0], EXP_10s, 0, missed_periods); in calc_avgs() 302 avg[1] = calc_load_n(avg[1], EXP_60s, 0, missed_periods); in calc_avgs() 303 avg[2] = calc_load_n(avg[2], EXP_300s, 0, missed_periods); in calc_avgs() 309 avg[0] = calc_load(avg[0], EXP_10s, pct); in calc_avgs() 310 avg[1] = calc_load(avg[1], EXP_60s, pct); in calc_avgs() 311 avg[2] = calc_load(avg[2], EXP_300s, pct); in calc_avgs() 1054 unsigned long avg[3]; in psi_show() local 1059 avg[w] = group->avg[res * 2 + full][w]; in psi_show() 1065 LOAD_INT(avg[0]), LOAD_FRAC(avg[0]), in psi_show() 1066 LOAD_INT(avg[1]), LOAD_FRAC(avg[1]), in psi_show() [all …]
|
A D | fair.c | 3025 cfs_rq->avg.load_avg += se->avg.load_avg; in enqueue_load_avg() 3471 se->avg.util_avg = gcfs_rq->avg.util_avg; in update_tg_cfs_util() 3472 se->avg.util_sum = se->avg.util_avg * divider; in update_tg_cfs_util() 3496 se->avg.runnable_avg = gcfs_rq->avg.runnable_avg; in update_tg_cfs_runnable() 3614 if (se->avg.load_avg || se->avg.util_avg) in skip_blocked_update() 3735 se->avg.period_contrib = cfs_rq->avg.period_contrib; in attach_entity_load_avg() 3743 se->avg.util_sum = se->avg.util_avg * divider; in attach_entity_load_avg() 3754 cfs_rq->avg.util_avg += se->avg.util_avg; in attach_entity_load_avg() 3755 cfs_rq->avg.util_sum += se->avg.util_sum; in attach_entity_load_avg() 3756 cfs_rq->avg.runnable_avg += se->avg.runnable_avg; in attach_entity_load_avg() [all …]
|
A D | debug.c | 483 P(se->avg.load_avg); in print_cfs_group_stats() 484 P(se->avg.util_avg); in print_cfs_group_stats() 485 P(se->avg.runnable_avg); in print_cfs_group_stats() 631 cfs_rq->avg.load_avg); in print_cfs_rq() 635 cfs_rq->avg.util_avg); in print_cfs_rq() 1034 P(se.avg.load_sum); in proc_sched_show_task() 1035 P(se.avg.runnable_sum); in proc_sched_show_task() 1036 P(se.avg.util_sum); in proc_sched_show_task() 1037 P(se.avg.load_avg); in proc_sched_show_task() 1038 P(se.avg.runnable_avg); in proc_sched_show_task() [all …]
|
/linux/kernel/trace/ |
A D | trace_benchmark.c | 45 unsigned int avg; in trace_do_benchmark() local 109 avg = delta; in trace_do_benchmark() 124 seed = avg; in trace_do_benchmark() 140 bm_last, bm_first, bm_max, bm_min, avg, std, stddev); in trace_do_benchmark() 143 bm_avg = avg; in trace_do_benchmark()
|
A D | ring_buffer_benchmark.c | 238 unsigned long avg; in ring_buffer_producer() local 348 avg = NSEC_PER_MSEC / hit; in ring_buffer_producer() 349 trace_printk("%ld ns per entry\n", avg); in ring_buffer_producer() 366 avg = NSEC_PER_MSEC / (hit + missed); in ring_buffer_producer() 367 trace_printk("%ld ns per entry\n", avg); in ring_buffer_producer()
|
/linux/include/uapi/linux/netfilter/ |
A D | xt_hashlimit.h | 34 __u32 avg; /* Average secs between packets * scale */ member 58 __u32 avg; /* Average secs between packets * scale */ member 71 __u64 avg; /* Average secs between packets * scale */ member 85 __u64 avg; /* Average secs between packets * scale */ member
|
/linux/tools/perf/bench/ |
A D | epoll-ctl.c | 280 unsigned long avg[EPOLL_NR_OPS]; in print_summary() local 284 avg[i] = avg_stats(&all_stats[i]); in print_summary() 289 avg[OP_EPOLL_ADD], rel_stddev_stats(stddev[OP_EPOLL_ADD], in print_summary() 290 avg[OP_EPOLL_ADD])); in print_summary() 292 avg[OP_EPOLL_MOD], rel_stddev_stats(stddev[OP_EPOLL_MOD], in print_summary() 293 avg[OP_EPOLL_MOD])); in print_summary() 295 avg[OP_EPOLL_DEL], rel_stddev_stats(stddev[OP_EPOLL_DEL], in print_summary() 296 avg[OP_EPOLL_DEL])); in print_summary()
|
/linux/drivers/cpuidle/governors/ |
A D | menu.c | 173 unsigned int min, max, thresh, avg; in get_typical_interval() local 206 avg = sum >> INTERVAL_SHIFT; in get_typical_interval() 208 avg = div_u64(sum, divisor); in get_typical_interval() 215 int64_t diff = (int64_t)value - avg; in get_typical_interval() 237 if ((((u64)avg*avg > variance*36) && (divisor * 4 >= INTERVALS * 3)) in get_typical_interval() 239 return avg; in get_typical_interval()
|
/linux/drivers/power/supply/ |
A D | ab8500_fg.c | 107 int avg; member 386 avg->sum += sample - avg->samples[avg->pos]; in ab8500_fg_add_cap_sample() 387 avg->samples[avg->pos] = sample; in ab8500_fg_add_cap_sample() 388 avg->time_stamps[avg->pos] = now; in ab8500_fg_add_cap_sample() 389 avg->pos++; in ab8500_fg_add_cap_sample() 403 avg->avg = avg->sum / avg->nbr_samples; in ab8500_fg_add_cap_sample() 405 return avg->avg; in ab8500_fg_add_cap_sample() 419 avg->pos = 0; in ab8500_fg_clear_cap_samples() 421 avg->sum = 0; in ab8500_fg_clear_cap_samples() 422 avg->avg = 0; in ab8500_fg_clear_cap_samples() [all …]
|
/linux/fs/ceph/ |
A D | debugfs.c | 130 #define CEPH_LAT_METRIC_SHOW(name, total, avg, min, max, sq) { \ argument 132 _avg = ktime_to_us(avg); \ 143 #define CEPH_SZ_METRIC_SHOW(name, total, avg, min, max, sum) { \ argument 146 name, total, avg, _min, max, sum); \ 178 s64 total, sum, avg, min, max, sq; in metrics_latency_show() local 189 avg = total > 0 ? DIV64_U64_ROUND_CLOSEST(sum, total) : 0; in metrics_latency_show() 194 CEPH_LAT_METRIC_SHOW(metric_str[i], total, avg, min, max, sq); in metrics_latency_show() 206 u64 sum, avg, min, max; in metrics_size_show() local 220 avg = total > 0 ? DIV64_U64_ROUND_CLOSEST(sum, total) : 0; in metrics_size_show() 224 CEPH_SZ_METRIC_SHOW(metric_str[i], total, avg, min, max, sum); in metrics_size_show()
|
/linux/net/dccp/ccids/lib/ |
A D | tfrc.h | 49 static inline u32 tfrc_ewma(const u32 avg, const u32 newval, const u8 weight) in tfrc_ewma() argument 51 return avg ? (weight * avg + (10 - weight) * newval) / 10 : newval; in tfrc_ewma()
|
/linux/kernel/time/ |
A D | test_udelay.c | 31 uint64_t avg; in udelay_test_single() local 55 avg = sum; in udelay_test_single() 56 do_div(avg, iters); in udelay_test_single() 59 (usecs * 1000) - allowed_error_ns, min, avg, max); in udelay_test_single()
|
/linux/drivers/clk/bcm/ |
A D | clk-bcm53573-ilp.c | 50 int avg; in bcm53573_ilp_recalc_rate() local 87 avg = sum / num; in bcm53573_ilp_recalc_rate() 89 return parent_rate * 4 / avg; in bcm53573_ilp_recalc_rate()
|
/linux/Documentation/devicetree/bindings/iio/adc/ |
A D | qcom,spmi-vadc.yaml | 132 qcom,avg-samples: 163 qcom,avg-samples: 186 qcom,avg-samples: 209 qcom,avg-samples: 232 qcom,avg-samples: 258 qcom,avg-samples = <1>;
|