Home
last modified time | relevance | path

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

12345

/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()
/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/drivers/mfd/
H A Dpcf50633-adc.c27 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
147 req->avg = avg; in pcf50633_adc_async_read()
/linux/tools/testing/selftests/kvm/
H A Ddirty_log_perf_test.c77 struct timespec avg; in vcpu_worker() local
120 avg = timespec_div(total, vcpu_last_completed_iteration[vcpu_idx]); in vcpu_worker()
123 total.tv_sec, total.tv_nsec, avg.tv_sec, avg.tv_nsec); in vcpu_worker()
148 struct timespec avg; in run_test() local
275 avg = timespec_div(get_dirty_log_total, p->iterations); in run_test()
278 get_dirty_log_total.tv_nsec, avg.tv_sec, avg.tv_nsec); in run_test()
281 avg = timespec_div(clear_dirty_log_total, p->iterations); in run_test()
284 clear_dirty_log_total.tv_nsec, avg.tv_sec, avg.tv_nsec); in run_test()
/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/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/kernel/sched/
H A Dpelt.h43 static inline u32 get_pelt_divider(struct sched_avg *avg) in get_pelt_divider() argument
45 return PELT_MIN_DIVIDER + avg->period_contrib; in get_pelt_divider()
48 static inline void cfs_se_util_change(struct sched_avg *avg) in cfs_se_util_change() argument
56 enqueued = avg->util_est; in cfs_se_util_change()
62 WRITE_ONCE(avg->util_est, enqueued); in cfs_se_util_change()
137 u32 util_sum = rq->cfs.avg.util_sum; in update_idle_rq_clock_pelt()
H A Dpelt.c297 if (___update_load_sum(now, &se->avg, 0, 0, 0)) { in __update_load_avg_blocked_se()
298 ___update_load_avg(&se->avg, se_weight(se)); in __update_load_avg_blocked_se()
308 if (___update_load_sum(now, &se->avg, !!se->on_rq, se_runnable(se), in __update_load_avg_se()
311 ___update_load_avg(&se->avg, se_weight(se)); in __update_load_avg_se()
312 cfs_se_util_change(&se->avg); in __update_load_avg_se()
322 if (___update_load_sum(now, &cfs_rq->avg, in __update_load_avg_cfs_rq()
327 ___update_load_avg(&cfs_rq->avg, 1); in __update_load_avg_cfs_rq()
H A Dfair.c656 s64 avg = cfs_rq->avg_vruntime; in avg_vruntime() local
662 avg += entity_key(cfs_rq, curr) * weight; in avg_vruntime()
668 if (avg < 0) in avg_vruntime()
669 avg -= (load - 1); in avg_vruntime()
670 avg = div_s64(avg, load); in avg_vruntime()
673 return cfs_rq->min_vruntime + avg; in avg_vruntime()
729 s64 avg = cfs_rq->avg_vruntime; in vruntime_eligible() local
735 avg += entity_key(cfs_rq, curr) * weight; in vruntime_eligible()
739 return avg >= (s64)(vruntime - cfs_rq->min_vruntime) * load; in vruntime_eligible()
1041 struct sched_avg *sa = &se->avg; in init_entity_runnable_average()
[all …]
H A Dpsi.c320 static void calc_avgs(unsigned long avg[3], int missed_periods, in calc_avgs()
327 avg[0] = calc_load_n(avg[0], EXP_10s, 0, missed_periods); in calc_avgs()
328 avg[1] = calc_load_n(avg[1], EXP_60s, 0, missed_periods); in calc_avgs()
329 avg[2] = calc_load_n(avg[2], EXP_300s, 0, missed_periods); in calc_avgs()
335 avg[0] = calc_load(avg[0], EXP_10s, pct); in calc_avgs()
336 avg[1] = calc_load(avg[1], EXP_60s, pct); in calc_avgs()
337 avg[2] = calc_load(avg[2], EXP_300s, pct); in calc_avgs()
550 calc_avgs(group->avg[s], missed_periods, sample, period); in update_averages()
1256 unsigned long avg[3] = { 0, }; in psi_show() local
1263 avg[w] = group->avg[res * 2 + full][w]; in psi_show()
[all …]
H A Ddebug.c688 P(se->avg.load_avg); in print_cfs_group_stats()
689 P(se->avg.util_avg); in print_cfs_group_stats()
690 P(se->avg.runnable_avg); in print_cfs_group_stats()
856 cfs_rq->avg.load_avg); in print_cfs_rq()
858 cfs_rq->avg.runnable_avg); in print_cfs_rq()
860 cfs_rq->avg.util_avg); in print_cfs_rq()
862 cfs_rq->avg.util_est); in print_cfs_rq()
1248 P(se.avg.load_sum); in proc_sched_show_task()
1249 P(se.avg.runnable_sum); in proc_sched_show_task()
1250 P(se.avg.util_sum); in proc_sched_show_task()
[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/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/drivers/hwmon/pmbus/
H A Dadm1275.c522 u32 avg; in adm1275_probe() local
789 "adi,power-sample-average", &avg) == 0) { in adm1275_probe()
790 if (!avg || avg > ADM1275_SAMPLES_AVG_MAX || in adm1275_probe()
791 BIT(__fls(avg)) != avg) { in adm1275_probe()
796 ret = adm1275_write_samples(data, client, true, ilog2(avg)); in adm1275_probe()
806 "adi,volt-curr-sample-average", &avg) == 0) { in adm1275_probe()
807 if (!avg || avg > ADM1275_SAMPLES_AVG_MAX || in adm1275_probe()
808 BIT(__fls(avg)) != avg) { in adm1275_probe()
813 ret = adm1275_write_samples(data, client, false, ilog2(avg)); in adm1275_probe()
/linux/tools/perf/util/
H A Dstat-display.c163 double total, double avg, bool before_metric) in print_cgroup_std()
165 double pct = rel_stddev_stats(total, avg); in print_cgroup_std()
180 struct evsel *evsel, double avg, bool before_metric) in print_cgroup()
188 print_noise_pct(config, stddev_stats(&ps->res_stats), avg, before_metric); in print_cgroup()
703 struct evsel *evsel, double avg, bool ok) in print_counter_value_csv()
716 fprintf(output, fmt, COUNTS_LEN, avg); in print_counter_value_json()
727 struct evsel *evsel, double avg, bool ok) in print_counter_value()
736 fprintf(output, fmt, avg, sep); in abs_printout()
747 struct evsel *evsel, double avg, bool ok) in is_mixed_hw_group()
753 fprintf(output, "\"counter-value\" : \"%f\", ", avg); in is_mixed_hw_group()
135 print_noise_pct(struct perf_stat_config * config,double total,double avg,bool before_metric) print_noise_pct() argument
152 print_noise(struct perf_stat_config * config,struct evsel * evsel,double avg,bool before_metric) print_noise() argument
662 print_counter_value_std(struct perf_stat_config * config,struct evsel * evsel,double avg,bool ok) print_counter_value_std() argument
686 print_counter_value_csv(struct perf_stat_config * config,struct evsel * evsel,double avg,bool ok) print_counter_value_csv() argument
706 print_counter_value_json(struct perf_stat_config * config,struct evsel * evsel,double avg,bool ok) print_counter_value_json() argument
723 print_counter_value(struct perf_stat_config * config,struct evsel * evsel,double avg,bool ok) print_counter_value() argument
735 abs_printout(struct perf_stat_config * config,struct aggr_cpu_id id,int aggr_nr,struct evsel * evsel,double avg,bool ok) abs_printout() argument
979 double avg = aggr->counts.val; print_counter_aggrdata() local
1409 print_table(struct perf_stat_config * config,FILE * output,int precision,double avg) print_table() argument
1443 double avg = avg_stats(config->walltime_nsecs_stats) / NSEC_PER_SEC; print_footer() local
[all...]
/linux/net/dccp/ccids/lib/
H A Dtfrc.h49 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/drivers/power/supply/
H A Dab8500_fg.c109 int avg; member
381 struct ab8500_fg_avg_cap *avg = &di->avg_cap; in ab8500_fg_add_cap_sample() local
384 avg->sum += sample - avg->samples[avg->pos]; in ab8500_fg_add_cap_sample()
385 avg->samples[avg->pos] = sample; in ab8500_fg_add_cap_sample()
386 avg->time_stamps[avg->pos] = now; in ab8500_fg_add_cap_sample()
387 avg->pos++; in ab8500_fg_add_cap_sample()
389 if (avg->pos == NBR_AVG_SAMPLES) in ab8500_fg_add_cap_sample()
390 avg->pos = 0; in ab8500_fg_add_cap_sample()
392 if (avg->nbr_samples < NBR_AVG_SAMPLES) in ab8500_fg_add_cap_sample()
393 avg->nbr_samples++; in ab8500_fg_add_cap_sample()
[all …]
/linux/fs/ceph/
H A Ddebugfs.c130 #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, avg, min, max, sq; in metrics_latency_show() local
188 avg = m->latency_avg; in metrics_latency_show()
193 CEPH_LAT_METRIC_SHOW(metric_str[i], total, avg, min, max, sq); in metrics_latency_show()
205 u64 sum, avg, min, max; in metrics_size_show() local
219 avg = total > 0 ? DIV64_U64_ROUND_CLOSEST(sum, total) : 0; in metrics_size_show()
223 CEPH_SZ_METRIC_SHOW(metric_str[i], total, avg, min, max, sum); in metrics_size_show()
H A Dmetric.c81 ktime_to_ceph_timespec(&read->avg, m->metric[METRIC_READ].latency_avg); in ceph_mdsc_send_metrics()
94 ktime_to_ceph_timespec(&write->avg, m->metric[METRIC_WRITE].latency_avg); in ceph_mdsc_send_metrics()
107 ktime_to_ceph_timespec(&meta->avg, m->metric[METRIC_METADATA].latency_avg); in ceph_mdsc_send_metrics()
331 ktime_t avg; in __update_mean_and_stdev() local
337 avg = *lavg + div64_s64(lat - *lavg, total); in __update_mean_and_stdev()
338 *sq_sump += (lat - *lavg)*(lat - avg); in __update_mean_and_stdev()
339 *lavg = avg; in __update_mean_and_stdev()
/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/drivers/platform/x86/amd/pmf/
H A Dspc.c58 u16 max, avg = 0; in amd_pmf_get_c0_residency() local
64 avg += core_res[i]; in amd_pmf_get_c0_residency()
68 avg = DIV_ROUND_CLOSEST(avg, size); in amd_pmf_get_c0_residency()
69 in->ev_info.avg_c0residency = avg; in amd_pmf_get_c0_residency()
/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/include/linux/mfd/pcf50633/
H A Dadc.h63 pcf50633_adc_async_read(struct pcf50633 *pcf, int mux, int avg,
67 pcf50633_adc_sync_read(struct pcf50633 *pcf, int mux, int avg);

12345