| /linux/net/netfilter/ |
| H 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()
|
| H A D | xt_hashlimit.c | 145 to->avg = cfg->avg; in cfg_copy() 157 to->avg = cfg->avg; in cfg_copy() 586 user2rate_bytes((u32)hinfo->cfg.avg); in rateinfo_init() 593 dh->rateinfo.rate = user2rate(hinfo->cfg.avg); in rateinfo_init() 600 dh->rateinfo.cost = user2credits_byte(hinfo->cfg.avg); in rateinfo_init() 603 dh->rateinfo.credit = user2credits(hinfo->cfg.avg * in rateinfo_init() 605 dh->rateinfo.cost = user2credits(hinfo->cfg.avg, revision); in rateinfo_init() 881 if (cfg->avg == 0 || cfg->avg > U32_MAX) { in hashlimit_mt_check_common() 891 if (user2credits_byte(cfg->avg) == 0) { in hashlimit_mt_check_common() 893 cfg->avg); in hashlimit_mt_check_common() [all …]
|
| /linux/net/bridge/netfilter/ |
| H 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/tools/testing/selftests/kvm/ |
| H A D | dirty_log_perf_test.c | 45 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 in run_test() [all...] |
| /linux/drivers/iio/humidity/ |
| H A D | hts221_core.c | 174 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 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/ |
| H A D | pelt.h | 47 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 D | psi.c | 342 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() 1278 unsigned long avg[3] = { 0, }; in psi_show() local 1285 avg[w] = group->avg[res * 2 + full][w]; in psi_show() [all …]
|
| H A D | fair.c | 925 s64 key, avg = cfs_rq->sum_w_vruntime; in vruntime_eligible() local 931 avg += entity_key(cfs_rq, curr) * weight; in vruntime_eligible() 949 return avg >= (__int128)key * load; in vruntime_eligible() 960 return avg >= rhs; in vruntime_eligible() 963 return avg >= key * load; in vruntime_eligible() 1323 struct sched_avg *sa = &se->avg; in init_entity_runnable_average() 1343 * util_avg = cfs_rq->avg.util_avg / (cfs_rq->avg.load_avg + 1) 1353 * util_avg_cap = (cpu_scale - cfs_rq->avg.util_avg) / 2^n 1370 struct sched_avg *sa = &se->avg; in post_init_entity_util_avg() 1856 update_avg_scale(u64 * avg,u64 sample) update_avg_scale() argument [all...] |
| /linux/kernel/trace/ |
| H A D | trace_benchmark.c | 45 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 D | ring_buffer_benchmark.c | 240 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 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/util/ |
| H A D | stat-display.c | 199 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/perf/bench/ |
| H A D | epoll-ctl.c | 294 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/net/dccp/ccids/lib/ |
| H A D | tfrc.h | |
| /linux/kernel/time/ |
| H 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/hwmon/pmbus/ |
| H A D | adm1275.c | 554 u32 avg; in adm1275_probe() local 901 "adi,power-sample-average", &avg) == 0) { in adm1275_probe() 902 if (!avg || avg > ADM1275_SAMPLES_AVG_MAX || in adm1275_probe() 903 BIT(__fls(avg)) != avg) { in adm1275_probe() 908 ret = adm1275_write_samples(data, client, true, ilog2(avg)); in adm1275_probe() 918 "adi,volt-curr-sample-average", &avg) == 0) { in adm1275_probe() 919 if (!avg || avg > ADM1275_SAMPLES_AVG_MAX || in adm1275_probe() 920 BIT(__fls(avg)) != avg) { in adm1275_probe() 925 ret = adm1275_write_samples(data, client, false, ilog2(avg)); in adm1275_probe()
|
| /linux/tools/testing/selftests/vfio/ |
| H A D | vfio_pci_device_init_perf_test.c | 119 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 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/fs/ceph/ |
| H A D | debugfs.c | 161 #define CEPH_LAT_METRIC_SHOW(name, total, avg, min, max, sq) { \ argument 163 _avg = ktime_to_us(avg); \ 174 #define CEPH_SZ_METRIC_SHOW(name, total, avg, min, max, sum) { \ argument 177 name, total, avg, _min, max, sum); \ 209 s64 total, avg, min, max, sq; in metrics_latency_show() local 219 avg = m->latency_avg; in metrics_latency_show() 224 CEPH_LAT_METRIC_SHOW(metric_str[i], total, avg, min, max, sq); in metrics_latency_show() 236 u64 sum, avg, min, max; in metrics_size_show() local 250 avg = total > 0 ? DIV64_U64_ROUND_CLOSEST(sum, total) : 0; in metrics_size_show() 254 CEPH_SZ_METRIC_SHOW(metric_str[i], total, avg, min, max, sum); in metrics_size_show()
|
| /linux/drivers/platform/x86/amd/pmf/ |
| H A D | spc.c | 141 u16 max, avg = 0; in amd_pmf_get_c0_residency() local 147 avg += core_res[i]; in amd_pmf_get_c0_residency() 151 avg = DIV_ROUND_CLOSEST(avg, size); in amd_pmf_get_c0_residency() 152 in->ev_info.avg_c0residency = avg; in amd_pmf_get_c0_residency()
|
| /linux/drivers/platform/x86/ |
| H A D | intel_ips.c | 631 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/arch/mips/cavium-octeon/ |
| H A D | oct_ilm.c | 33 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/tools/perf/scripts/python/ |
| H A D | futex-contention.py | 55 min, max, avg, count = lock_waits[tid, lock] 57 (process_names[tid], tid, lock, count, avg, max, min))
|
| /linux/tools/lib/perf/tests/ |
| H A D | test-evlist.c | 455 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()
|