| /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()
|
| /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.tv_sec, avg.tv_nsec); in run_test()
|
| /linux/drivers/cpuidle/governors/ |
| H A D | menu.c | 120 u64 avg, variance, avg_sq; in get_typical_interval() local 127 avg = 0; in get_typical_interval() 141 avg += value; in get_typical_interval() 155 avg >>= INTERVAL_SHIFT; in get_typical_interval() 158 do_div(avg, divisor); in get_typical_interval() 162 avg_sq = avg * avg; in get_typical_interval() 180 return avg; in get_typical_interval() 204 if (avg - min > max - avg) in get_typical_interval()
|
| /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 | pelt.c | 298 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 D | fair.c | 657 s64 avg = cfs_rq->avg_vruntime; in avg_vruntime() local 663 avg += entity_key(cfs_rq, curr) * weight; in avg_vruntime() 669 if (avg < 0) in avg_vruntime() 670 avg -= (load - 1); in avg_vruntime() 671 avg = div_s64(avg, load); in avg_vruntime() 674 return cfs_rq->min_vruntime + avg; in avg_vruntime() 725 s64 avg = cfs_rq->avg_vruntime; in vruntime_eligible() local 731 avg += entity_key(cfs_rq, curr) * weight; in vruntime_eligible() 735 return avg >= (s64)(vruntime - cfs_rq->min_vruntime) * load; in vruntime_eligible() 1074 struct sched_avg *sa = &se->avg; in init_entity_runnable_average() [all …]
|
| 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() 1272 unsigned long avg[3] = { 0, }; in psi_show() local 1279 avg[w] = group->avg[res * 2 + full][w]; in psi_show() [all …]
|
| H A D | debug.c | 680 P(se->avg.load_avg); in print_cfs_group_stats() 681 P(se->avg.util_avg); in print_cfs_group_stats() 682 P(se->avg.runnable_avg); in print_cfs_group_stats() 843 cfs_rq->avg.load_avg); in print_cfs_rq() 845 cfs_rq->avg.runnable_avg); in print_cfs_rq() 847 cfs_rq->avg.util_avg); in print_cfs_rq() 849 cfs_rq->avg.util_est); in print_cfs_rq() 1227 P(se.avg.load_sum); in proc_sched_show_task() 1228 P(se.avg.runnable_sum); in proc_sched_show_task() 1229 P(se.avg.util_sum); in proc_sched_show_task() [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/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/drivers/hwmon/pmbus/ |
| H A D | adm1275.c | 525 u32 avg; in adm1275_probe() local 796 "adi,power-sample-average", &avg) == 0) { in adm1275_probe() 797 if (!avg || avg > ADM1275_SAMPLES_AVG_MAX || in adm1275_probe() 798 BIT(__fls(avg)) != avg) { in adm1275_probe() 803 ret = adm1275_write_samples(data, client, true, ilog2(avg)); in adm1275_probe() 813 "adi,volt-curr-sample-average", &avg) == 0) { in adm1275_probe() 814 if (!avg || avg > ADM1275_SAMPLES_AVG_MAX || in adm1275_probe() 815 BIT(__fls(avg)) != avg) { in adm1275_probe() 820 ret = adm1275_write_samples(data, client, false, ilog2(avg)); in adm1275_probe()
|
| /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() 721 struct evsel *evsel, double avg, bool ok) in print_counter_value_std() argument 734 fprintf(output, fmt, COUNTS_LEN, avg); in print_counter_value_std() 745 struct evsel *evsel, double avg, bool ok) in print_counter_value_csv() argument 754 fprintf(output, fmt, avg, sep); in print_counter_value_csv() 765 struct evsel *evsel, double avg, bool ok) in print_counter_value_json() argument 770 json_out(os, "\"counter-value\" : \"%f\"", avg); in print_counter_value_json() [all …]
|
| /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/power/supply/ |
| H A D | ab8500_fg.c | 109 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 D | debugfs.c | 128 #define CEPH_LAT_METRIC_SHOW(name, total, avg, min, max, sq) { \ argument 130 _avg = ktime_to_us(avg); \ 141 #define CEPH_SZ_METRIC_SHOW(name, total, avg, min, max, sum) { \ argument 144 name, total, avg, _min, max, sum); \ 176 s64 total, avg, min, max, sq; in metrics_latency_show() local 186 avg = m->latency_avg; in metrics_latency_show() 191 CEPH_LAT_METRIC_SHOW(metric_str[i], total, avg, min, max, sq); in metrics_latency_show() 203 u64 sum, avg, min, max; in metrics_size_show() local 217 avg = total > 0 ? DIV64_U64_ROUND_CLOSEST(sum, total) : 0; in metrics_size_show() 221 CEPH_SZ_METRIC_SHOW(metric_str[i], total, avg, min, max, sum); in metrics_size_show()
|
| H A D | metric.c | 81 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/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/drivers/media/platform/qcom/camss/ |
| H A D | camss.c | 296 .icc_bw_tbl.avg = 38400, 301 .icc_bw_tbl.avg = 939524, 306 .icc_bw_tbl.avg = 939524, 637 .icc_bw_tbl.avg = 150000, 642 .icc_bw_tbl.avg = 2097152, 647 .icc_bw_tbl.avg = 2097152, 1585 .icc_bw_tbl.avg = 38400, 1590 .icc_bw_tbl.avg = 2097152, 1595 .icc_bw_tbl.avg = 0, 1600 .icc_bw_tbl.avg = 2097152, [all …]
|
| /linux/drivers/platform/x86/amd/pmf/ |
| H A D | spc.c | 186 u16 max, avg = 0; in amd_pmf_get_c0_residency() local 192 avg += core_res[i]; in amd_pmf_get_c0_residency() 196 avg = DIV_ROUND_CLOSEST(avg, size); in amd_pmf_get_c0_residency() 197 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 …]
|