Home
last modified time | relevance | path

Searched refs:avg (Results 1 – 25 of 81) sorted by relevance

1234

/linux/net/netfilter/
H A Dxt_limit.c112 || 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()
H A Dxt_hashlimit.c144 to->avg = cfg->avg; in cfg_copy()
156 to->avg = cfg->avg; in cfg_copy()
584 user2rate_bytes((u32)hinfo->cfg.avg); in rateinfo_init()
591 dh->rateinfo.rate = user2rate(hinfo->cfg.avg); in rateinfo_init()
598 dh->rateinfo.cost = user2credits_byte(hinfo->cfg.avg); in rateinfo_init()
601 dh->rateinfo.credit = user2credits(hinfo->cfg.avg * in rateinfo_init()
603 dh->rateinfo.cost = user2credits(hinfo->cfg.avg, revision); in rateinfo_init()
876 if (cfg->avg == 0 || cfg->avg > U32_MAX) { in hashlimit_mt_check_common()
886 if (user2credits_byte(cfg->avg) == 0) { in hashlimit_mt_check_common()
888 cfg->avg); in hashlimit_mt_check_common()
[all …]
/linux/net/bridge/netfilter/
H A Debt_limit.c75 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/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/
H A DUtil.py20 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/tools/testing/selftests/kvm/
H A Ddirty_log_perf_test.c45 struct timespec avg; in vcpu_worker() local
88 avg = timespec_div(total, vcpu_last_completed_iteration[vcpu_idx]); in vcpu_worker()
91 total.tv_sec, total.tv_nsec, avg.tv_sec, avg.tv_nsec); in vcpu_worker()
116 struct timespec avg; in run_test() local
241 avg = timespec_div(get_dirty_log_total, p->iterations); in run_test()
244 get_dirty_log_total.tv_nsec, avg.tv_sec, avg.tv_nsec); in run_test()
247 avg = timespec_div(clear_dirty_log_total, p->iterations); in run_test()
250 clear_dirty_log_total.tv_nsec, avg.tv_sec, avg.tv_nsec); in run_test()
/linux/kernel/sched/
H A Dpelt.h47 static inline u32 get_pelt_divider(struct sched_avg *avg) in get_pelt_divider() argument
49 return PELT_MIN_DIVIDER + avg->period_contrib; in get_pelt_divider()
52 static inline void cfs_se_util_change(struct sched_avg *avg) in cfs_se_util_change() argument
60 enqueued = avg->util_est; in cfs_se_util_change()
66 WRITE_ONCE(avg->util_est, enqueued); in cfs_se_util_change()
141 u32 util_sum = rq->cfs.avg.util_sum; in update_idle_rq_clock_pelt()
H A Dpelt.c298 if (___update_load_sum(now, &se->avg, 0, 0, 0)) { in __update_load_avg_blocked_se()
299 ___update_load_avg(&se->avg, se_weight(se)); in __update_load_avg_blocked_se()
309 if (___update_load_sum(now, &se->avg, !!se->on_rq, se_runnable(se), in __update_load_avg_se()
312 ___update_load_avg(&se->avg, se_weight(se)); in __update_load_avg_se()
313 cfs_se_util_change(&se->avg); in __update_load_avg_se()
323 if (___update_load_sum(now, &cfs_rq->avg, in __update_load_avg_cfs_rq()
328 ___update_load_avg(&cfs_rq->avg, 1); in __update_load_avg_cfs_rq()
H A Dpsi.c342 static void calc_avgs(unsigned long avg[3], int missed_periods, in calc_avgs()
349 avg[0] = calc_load_n(avg[0], EXP_10s, 0, missed_periods); in calc_avgs()
350 avg[1] = calc_load_n(avg[1], EXP_60s, 0, missed_periods); in calc_avgs()
351 avg[2] = calc_load_n(avg[2], EXP_300s, 0, missed_periods); in calc_avgs()
357 avg[0] = calc_load(avg[0], EXP_10s, pct); in calc_avgs()
358 avg[1] = calc_load(avg[1], EXP_60s, pct); in calc_avgs()
359 avg[2] = calc_load(avg[2], EXP_300s, pct); in calc_avgs()
572 calc_avgs(group->avg[s], missed_periods, sample, period); in update_averages()
1272 unsigned long avg[3] = { 0, }; in psi_show() local
1279 avg[w] = group->avg[res * 2 + full][w]; in psi_show()
[all …]
/linux/drivers/iio/humidity/
H A Dhts221_core.c174 const struct hts221_avg *avg = &hts221_avg_list[type]; in hts221_update_avg() local
178 if (avg->avg_avl[i] == val) in hts221_update_avg()
184 data = ((i << __ffs(avg->mask)) & avg->mask); in hts221_update_avg()
185 err = regmap_update_bits(hw->regmap, avg->addr, in hts221_update_avg()
186 avg->mask, data); in hts221_update_avg()
215 const struct hts221_avg *avg = &hts221_avg_list[HTS221_SENSOR_H]; in hts221_sysfs_rh_oversampling_avail() local
219 for (i = 0; i < ARRAY_SIZE(avg->avg_avl); i++) in hts221_sysfs_rh_oversampling_avail()
221 avg->avg_avl[i]); in hts221_sysfs_rh_oversampling_avail()
232 const struct hts221_avg *avg = &hts221_avg_list[HTS221_SENSOR_T]; in hts221_sysfs_temp_oversampling_avail() local
236 for (i = 0; i < ARRAY_SIZE(avg->avg_avl); i++) in hts221_sysfs_temp_oversampling_avail()
[all …]
/linux/kernel/trace/
H A Dtrace_benchmark.c45 unsigned int avg; in trace_do_benchmark() local
108 avg = delta; in trace_do_benchmark()
123 seed = avg; in trace_do_benchmark()
139 bm_last, bm_first, bm_max, bm_min, avg, std, stddev); in trace_do_benchmark()
142 bm_avg = avg; in trace_do_benchmark()
H A Dring_buffer_benchmark.c240 unsigned long avg; in ring_buffer_producer() local
350 avg = NSEC_PER_MSEC / hit; in ring_buffer_producer()
351 trace_printk("%ld ns per entry\n", avg); in ring_buffer_producer()
368 avg = NSEC_PER_MSEC / (hit + missed); in ring_buffer_producer()
369 trace_printk("%ld ns per entry\n", avg); in ring_buffer_producer()
/linux/include/uapi/linux/netfilter/
H A Dxt_hashlimit.h34 __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/net/dccp/ccids/lib/
H A Dtfrc.h
/linux/tools/perf/bench/
H A Depoll-ctl.c294 unsigned long avg[EPOLL_NR_OPS]; in print_summary() local
298 avg[i] = avg_stats(&all_stats[i]); in print_summary()
303 avg[OP_EPOLL_ADD], rel_stddev_stats(stddev[OP_EPOLL_ADD], in print_summary()
304 avg[OP_EPOLL_ADD])); in print_summary()
306 avg[OP_EPOLL_MOD], rel_stddev_stats(stddev[OP_EPOLL_MOD], in print_summary()
307 avg[OP_EPOLL_MOD])); in print_summary()
309 avg[OP_EPOLL_DEL], rel_stddev_stats(stddev[OP_EPOLL_DEL], in print_summary()
310 avg[OP_EPOLL_DEL])); in print_summary()
/linux/kernel/time/
H A Dtest_udelay.c31 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/tools/perf/util/
H A Dstat-display.c199 double total, double avg, bool before_metric) in print_noise_pct() argument
201 double pct = rel_stddev_stats(total, avg); in print_noise_pct()
216 struct evsel *evsel, double avg, bool before_metric) in print_noise() argument
224 print_noise_pct(config, os, stddev_stats(&ps->res_stats), avg, before_metric); in print_noise()
688 struct evsel *evsel, double avg, bool ok)
701 fprintf(output, fmt, COUNTS_LEN, avg); in print_counter_value_std()
712 struct evsel *evsel, double avg, bool ok)
721 fprintf(output, fmt, avg, sep); in print_counter_value_csv()
732 struct evsel *evsel, double avg, bool ok)
737 json_out(os, "\"counter-value\" : \"%f\"", avg); in print_counter_value_json()
690 print_counter_value_std(struct perf_stat_config * config,struct evsel * evsel,double avg,bool ok) print_counter_value_std() argument
714 print_counter_value_csv(struct perf_stat_config * config,struct evsel * evsel,double avg,bool ok) print_counter_value_csv() argument
734 print_counter_value_json(struct outstate * os,struct evsel * evsel,double avg,bool ok) print_counter_value_json() argument
750 print_counter_value(struct perf_stat_config * config,struct outstate * os,struct evsel * evsel,double avg,bool ok) print_counter_value() argument
763 abs_printout(struct perf_stat_config * config,struct outstate * os,struct aggr_cpu_id id,int aggr_nr,struct evsel * evsel,double avg,bool ok) abs_printout() argument
961 double avg = aggr->counts.val; print_counter_aggrdata() local
1393 print_table(struct perf_stat_config * config,FILE * output,double avg) print_table() argument
1426 double avg = avg_stats(config->walltime_nsecs_stats) / NSEC_PER_SEC; print_footer() local
[all...]
/linux/tools/testing/selftests/vfio/
H A Dvfio_pci_device_init_perf_test.c119 struct timespec avg = {}; in TEST_F() local
144 avg = to_timespec(thread_ns / nr_devices); in TEST_F()
154 avg.tv_sec, avg.tv_nsec); in TEST_F()
/linux/drivers/clk/bcm/
H A Dclk-bcm53573-ilp.c50 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/tools/perf/scripts/python/
H A Dfutex-contention.py55 min, max, avg, count = lock_waits[tid, lock]
57 (process_names[tid], tid, lock, count, avg, max, min))
/linux/arch/mips/cavium-octeon/
H A Doct_ilm.c33 u64 cpuclk, avg, max, min; in oct_ilm_show() local
40 avg = (curr_li.latency_sum * 1000000000) / (cpuclk * curr_li.interrupt_cnt); in oct_ilm_show()
43 curr_li.interrupt_cnt, avg, max, min); in oct_ilm_show()
/linux/drivers/platform/x86/
H A Dintel_ips.c631 int avg; in cpu_exceeded() local
635 avg = cpu ? ips->ctv2_avg_temp : ips->ctv1_avg_temp; in cpu_exceeded()
636 if (avg > (ips->limits->core_temp_limit * 100)) in cpu_exceeded()
826 u16 avg; in calc_avg_temp() local
833 avg = (u16)total; in calc_avg_temp()
835 return avg; in calc_avg_temp()
899 static u16 update_average_temp(u16 avg, u16 val) in update_average_temp() argument
905 (((temp_decay_factor - 1) * avg) / temp_decay_factor); in update_average_temp()
910 static u16 update_average_power(u32 avg, u32 val) in update_average_power() argument
915 (((power_decay_factor - 1) * avg) / power_decay_factor); in update_average_power()
[all …]
/linux/tools/lib/perf/tests/
H A Dtest-evlist.c455 long long max = 0, min = 0, avg = 0; in test_stat_multiplexing() local
551 avg += counts[i].val; in test_stat_multiplexing()
558 avg = avg / nonzero; in test_stat_multiplexing()
560 avg = 0; in test_stat_multiplexing()
562 error = display_error(avg, max, min, expected_counts.val); in test_stat_multiplexing()
/linux/fs/ceph/
H A Dmetric.h78 struct ceph_timespec avg; member
87 struct ceph_timespec avg; member
96 struct ceph_timespec avg; member
H A Dmetric.c186 ktime_to_ceph_timespec(&read->avg, m->metric[METRIC_READ].latency_avg); in ceph_mdsc_send_metrics()
199 ktime_to_ceph_timespec(&write->avg, m->metric[METRIC_WRITE].latency_avg); in ceph_mdsc_send_metrics()
212 ktime_to_ceph_timespec(&meta->avg, m->metric[METRIC_METADATA].latency_avg); in ceph_mdsc_send_metrics()
502 ktime_t avg; in __update_mean_and_stdev() local
508 avg = *lavg + div64_s64(lat - *lavg, total); in __update_mean_and_stdev()
509 *sq_sump += (lat - *lavg)*(lat - avg); in __update_mean_and_stdev()
510 *lavg = avg; in __update_mean_and_stdev()
/linux/arch/parisc/kernel/
H A Dirq.c211 unsigned int k, avg, min, max; in show_interrupts() local
215 for (avg = k = 0; k < PARISC_CR16_HIST_SIZE; k++) { in show_interrupts()
219 avg += hist; in show_interrupts()
227 avg /= k; in show_interrupts()
229 min,avg,max); in show_interrupts()

1234