Searched refs:avg (Results 1 - 104 of 104) sorted by relevance

/linux-4.1.27/include/linux/
H A Daverage.h14 extern void ewma_init(struct ewma *avg, unsigned long factor,
17 extern struct ewma *ewma_add(struct ewma *avg, unsigned long val);
21 * @avg: Average structure
23 * Returns the average value held in @avg.
25 static inline unsigned long ewma_read(const struct ewma *avg) ewma_read() argument
27 return avg->internal >> avg->factor; ewma_read()
H A Duwb.h812 int min, max, avg; stats_show() local
815 min = max = avg = 0; stats_show()
819 avg = stats->sigma / samples; stats_show()
821 return scnprintf(buf, PAGE_SIZE, "%d %d %d\n", min, max, avg); stats_show()
H A Dsched.h1208 struct sched_avg avg; member in struct:sched_entity
/linux-4.1.27/lib/
H A Daverage.c27 * @avg: Average structure
35 * Initialize the EWMA parameters for a given struct ewma @avg.
37 void ewma_init(struct ewma *avg, unsigned long factor, unsigned long weight) ewma_init() argument
41 avg->weight = ilog2(weight); ewma_init()
42 avg->factor = ilog2(factor); ewma_init()
43 avg->internal = 0; ewma_init()
49 * @avg: Average structure
54 struct ewma *ewma_add(struct ewma *avg, unsigned long val) ewma_add() argument
56 unsigned long internal = ACCESS_ONCE(avg->internal); ewma_add()
58 ACCESS_ONCE(avg->internal) = internal ? ewma_add()
59 (((internal << avg->weight) - internal) + ewma_add()
60 (val << avg->factor)) >> avg->weight : ewma_add()
61 (val << avg->factor); ewma_add()
62 return avg; ewma_add()
/linux-4.1.27/net/bridge/netfilter/
H A Debt_limit.c74 user2credits(info->avg * info->burst) < user2credits(info->avg)) { ebt_limit_mt_check()
76 info->avg, info->burst); ebt_limit_mt_check()
80 /* User avg in seconds * EBT_LIMIT_SCALE: convert to jiffies * 128. */ ebt_limit_mt_check()
82 info->credit = user2credits(info->avg * info->burst); ebt_limit_mt_check()
83 info->credit_cap = user2credits(info->avg * info->burst); ebt_limit_mt_check()
84 info->cost = user2credits(info->avg); ebt_limit_mt_check()
92 * only avg/burst have meaningful values in userspace.
95 compat_uint_t avg, burst; member in struct:ebt_compat_limit_info
/linux-4.1.27/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/
H A DUtil.py19 def avg(total, n): function
39 min, max, avg, count = dict[key]
44 avg = (avg + value) / 2
45 dict[key] = (min, max, avg, count + 1)
/linux-4.1.27/tools/perf/util/
H A Dstat.c55 double rel_stddev_stats(double stddev, double avg) rel_stddev_stats() argument
59 if (avg) rel_stddev_stats()
60 pct = 100.0 * stddev/avg; rel_stddev_stats()
H A Dstat.h15 double rel_stddev_stats(double stddev, double avg);
/linux-4.1.27/include/uapi/linux/netfilter_bridge/
H A Debt_limit.h15 __u32 avg; /* Average secs between packets * scale */ member in struct:ebt_limit_info
/linux-4.1.27/drivers/mfd/
H A Dpcf50633-adc.c31 int avg; member in struct:pcf50633_adc_request
58 static void adc_setup(struct pcf50633 *pcf, int channel, int avg) adc_setup() argument
67 pcf50633_reg_write(pcf, PCF50633_REG_ADCC1, channel | avg | adc_setup()
81 adc_setup(pcf, adc->queue[head]->mux, adc->queue[head]->avg); trigger_next_adc_job_if_any()
120 int pcf50633_adc_sync_read(struct pcf50633 *pcf, int mux, int avg) pcf50633_adc_sync_read() argument
127 ret = pcf50633_adc_async_read(pcf, mux, avg, pcf50633_adc_sync_read()
138 int pcf50633_adc_async_read(struct pcf50633 *pcf, int mux, int avg, pcf50633_adc_async_read() argument
150 req->avg = avg; pcf50633_adc_async_read()
H A Dab8500-gpadc.c430 "gpadc_conversion: set avg samples failed\n"); ab8500_gpadc_double_read_raw()
/linux-4.1.27/kernel/trace/
H A Dtrace_benchmark.c42 unsigned int avg; trace_do_benchmark() local
80 * We should have enough data for the avg and stddev anyway. trace_do_benchmark()
84 "last=%llu first=%llu max=%llu min=%llu ** avg=%u std=%d std^2=%lld", trace_do_benchmark()
106 avg = delta; trace_do_benchmark()
121 seed = avg; trace_do_benchmark()
136 "last=%llu first=%llu max=%llu min=%llu avg=%u std=%d std^2=%lld", trace_do_benchmark()
137 bm_last, bm_first, bm_max, bm_min, avg, std, stddev); trace_do_benchmark()
140 bm_avg = avg; trace_do_benchmark()
H A Dring_buffer_benchmark.c221 unsigned long avg; ring_buffer_producer() local
334 avg = NSEC_PER_MSEC / hit; ring_buffer_producer()
335 trace_printk("%ld ns per entry\n", avg); ring_buffer_producer()
352 avg = NSEC_PER_MSEC / (hit + missed); ring_buffer_producer()
353 trace_printk("%ld ns per entry\n", avg); ring_buffer_producer()
H A Dftrace.c622 unsigned long long avg; function_stat_show() local
638 avg = rec->time; function_stat_show()
639 do_div(avg, rec->counter); function_stat_show()
662 trace_print_graph_duration(avg, &s); function_stat_show()
/linux-4.1.27/include/uapi/linux/netfilter/
H A Dxt_limit.h14 __u32 avg; /* Average secs between packets * scale */ member in struct:xt_rateinfo
H A Dxt_hashlimit.h29 __u32 avg; /* Average secs between packets * scale */ member in struct:hashlimit_cfg
53 __u32 avg; /* Average secs between packets * scale */ member in struct:hashlimit_cfg1
/linux-4.1.27/net/dccp/ccids/lib/
H A Dtfrc.h53 static inline u32 tfrc_ewma(const u32 avg, const u32 newval, const u8 weight) tfrc_ewma() argument
55 return avg ? (weight * avg + (10 - weight) * newval) / 10 : newval; tfrc_ewma()
/linux-4.1.27/tools/perf/scripts/python/
H A Dfutex-contention.py47 min, max, avg, count = lock_waits[tid, lock]
48 print "%s[%d] lock %x contended %d times, %d avg ns" % \
49 (process_names[tid], tid, lock, count, avg)
/linux-4.1.27/kernel/time/
H A Dtest_udelay.c40 uint64_t avg; udelay_test_single() local
64 avg = sum; udelay_test_single()
65 do_div(avg, iters); udelay_test_single()
66 seq_printf(s, "%d usecs x %d: exp=%d allowed=%d min=%d avg=%lld max=%d", udelay_test_single()
68 (usecs * 1000) - allowed_error_ns, min, avg, max); udelay_test_single()
/linux-4.1.27/net/netfilter/
H A Dxt_limit.c109 || user2credits(r->avg * r->burst) < user2credits(r->avg)) { limit_mt_check()
111 r->avg, r->burst); limit_mt_check()
121 /* User avg in seconds * XT_LIMIT_SCALE: convert to jiffies * limit_mt_check()
124 priv->credit = user2credits(r->avg * r->burst); /* Credits full. */ limit_mt_check()
127 r->cost = user2credits(r->avg); limit_mt_check()
141 u_int32_t avg; member in struct:compat_xt_rateinfo
157 .avg = cm->avg, limit_mt_compat_from_user()
171 .avg = m->avg, limit_mt_compat_to_user()
H A Dxt_hashlimit.c477 dh->rateinfo.cost = user2credits_byte(hinfo->cfg.avg); rateinfo_init()
480 dh->rateinfo.credit = user2credits(hinfo->cfg.avg * rateinfo_init()
482 dh->rateinfo.cost = user2credits(hinfo->cfg.avg); rateinfo_init()
689 if (user2credits_byte(info->cfg.avg) == 0) { hashlimit_mt_check()
690 pr_info("overflow, rate too high: %u\n", info->cfg.avg); hashlimit_mt_check()
694 user2credits(info->cfg.avg * info->cfg.burst) < hashlimit_mt_check()
695 user2credits(info->cfg.avg)) { hashlimit_mt_check()
697 info->cfg.avg, info->cfg.burst); hashlimit_mt_check()
/linux-4.1.27/tools/perf/
H A Dbuiltin-stat.c788 static void print_noise_pct(double total, double avg) print_noise_pct() argument
790 double pct = rel_stddev_stats(total, avg); print_noise_pct()
798 static void print_noise(struct perf_evsel *evsel, double avg) print_noise() argument
806 print_noise_pct(stddev_stats(&ps->res_stats[0]), avg); print_noise()
842 static void nsec_printout(int id, int nr, struct perf_evsel *evsel, double avg) nsec_printout() argument
844 double msecs = avg / 1e6; nsec_printout()
873 avg / avg_stats(&walltime_nsecs_stats)); nsec_printout()
907 __maybe_unused, double avg) print_stalled_cycles_frontend()
915 ratio = avg / total * 100.0; print_stalled_cycles_frontend()
926 __maybe_unused, double avg) print_stalled_cycles_backend()
934 ratio = avg / total * 100.0; print_stalled_cycles_backend()
945 double avg) print_branch_misses()
953 ratio = avg / total * 100.0; print_branch_misses()
964 double avg) print_l1_dcache_misses()
972 ratio = avg / total * 100.0; print_l1_dcache_misses()
983 double avg) print_l1_icache_misses()
991 ratio = avg / total * 100.0; print_l1_icache_misses()
1002 double avg) print_dtlb_cache_misses()
1010 ratio = avg / total * 100.0; print_dtlb_cache_misses()
1021 double avg) print_itlb_cache_misses()
1029 ratio = avg / total * 100.0; print_itlb_cache_misses()
1040 double avg) print_ll_cache_misses()
1048 ratio = avg / total * 100.0; print_ll_cache_misses()
1057 static void abs_printout(int id, int nr, struct perf_evsel *evsel, double avg) abs_printout() argument
1078 fprintf(output, fmt, avg, csv_sep); abs_printout()
1096 ratio = avg / total; abs_printout()
1104 if (total && avg) { abs_printout()
1105 ratio = total / avg; abs_printout()
1114 print_branch_misses(cpu, evsel, avg); abs_printout()
1121 print_l1_dcache_misses(cpu, evsel, avg); abs_printout()
1128 print_l1_icache_misses(cpu, evsel, avg); abs_printout()
1135 print_dtlb_cache_misses(cpu, evsel, avg); abs_printout()
1142 print_itlb_cache_misses(cpu, evsel, avg); abs_printout()
1149 print_ll_cache_misses(cpu, evsel, avg); abs_printout()
1155 ratio = avg * 100 / total; abs_printout()
1160 print_stalled_cycles_frontend(cpu, evsel, avg); abs_printout()
1162 print_stalled_cycles_backend(cpu, evsel, avg); abs_printout()
1167 ratio = avg / total; abs_printout()
1178 100.0 * (avg / total)); abs_printout()
1183 if (total2 < avg) abs_printout()
1184 total2 = avg; abs_printout()
1188 100.0 * ((total2-avg) / total)); abs_printout()
1191 avg > 0 && abs_printout()
1196 ratio = total / avg; abs_printout()
1201 avg > 0 && abs_printout()
1206 ratio = total / avg; abs_printout()
1215 ratio = 1000.0 * avg / total; abs_printout()
1301 double avg = avg_stats(&ps->res_stats[0]); print_counter_aggr() local
1332 uval = avg * counter->scale; print_counter_aggr()
1339 print_noise(counter, avg); print_counter_aggr()
905 print_stalled_cycles_frontend(int cpu, struct perf_evsel *evsel __maybe_unused, double avg) print_stalled_cycles_frontend() argument
924 print_stalled_cycles_backend(int cpu, struct perf_evsel *evsel __maybe_unused, double avg) print_stalled_cycles_backend() argument
943 print_branch_misses(int cpu, struct perf_evsel *evsel __maybe_unused, double avg) print_branch_misses() argument
962 print_l1_dcache_misses(int cpu, struct perf_evsel *evsel __maybe_unused, double avg) print_l1_dcache_misses() argument
981 print_l1_icache_misses(int cpu, struct perf_evsel *evsel __maybe_unused, double avg) print_l1_icache_misses() argument
1000 print_dtlb_cache_misses(int cpu, struct perf_evsel *evsel __maybe_unused, double avg) print_dtlb_cache_misses() argument
1019 print_itlb_cache_misses(int cpu, struct perf_evsel *evsel __maybe_unused, double avg) print_itlb_cache_misses() argument
1038 print_ll_cache_misses(int cpu, struct perf_evsel *evsel __maybe_unused, double avg) print_ll_cache_misses() argument
H A Dbuiltin-sched.c1146 u64 avg; output_lat_thread() local
1164 avg = work_list->total_lat / work_list->nb_atoms; output_lat_thread()
1166 printf("|%11.3f ms |%9" PRIu64 " | avg:%9.3f ms | max:%9.3f ms | max at: %13.6f s\n", output_lat_thread()
1168 work_list->nb_atoms, (double)avg / 1e6, output_lat_thread()
1238 .name = "avg", sort_dimension__add()
1687 const char default_sort_order[] = "avg, max, switch, runtime"; cmd_sched()
1708 "sort by key(s): runtime, switch, avg, max"), cmd_sched()
H A Dbuiltin-trace.c2465 printed += fprintf(fp, " syscall calls min avg max stddev\n"); thread__dump_stats()
2475 double avg = avg_stats(stats); thread__dump_stats() local
2479 pct = avg ? 100.0 * stddev_stats(stats)/avg : 0.0; thread__dump_stats()
2480 avg /= NSEC_PER_MSEC; thread__dump_stats()
2485 n, min, avg); thread__dump_stats()
H A Dbuiltin-kvm.c1205 " time (sort by avg time)"), kvm_events_report()
1307 " time (sort by avg time)"), kvm_events_live()
H A Dbuiltin-lock.c713 pr_info("%15s ", "avg wait (ns)"); print_result()
/linux-4.1.27/include/net/
H A Dred.h25 avg = (1-W)*avg + W*current_queue_len,
31 if (avg > th_max) -> packet marked (dropped).
32 if (avg < th_min) -> packet passes.
33 if (th_min < avg < th_max) we calculate probability:
35 Pb = max_P * (avg - th_min)/(th_max-th_min)
38 Pb changes from 0 (at avg==th_min) to max_P (avg==th_max).
97 * if (avg > target and max_p <= 0.5)
99 * else if (avg < target and max_p >= 0.01)
129 u32 qth_min; /* Min avg length threshold: Wlog scaled */
130 u32 qth_max; /* Max avg length threshold: Wlog scaled */
/linux-4.1.27/kernel/sched/
H A Ddebug.c72 struct sched_avg *avg = &cpu_rq(cpu)->avg; print_cfs_group_stats() local
73 P(avg->runnable_avg_sum); print_cfs_group_stats()
74 P(avg->avg_period); print_cfs_group_stats()
96 P(se->avg.runnable_avg_sum); print_cfs_group_stats()
97 P(se->avg.running_avg_sum); print_cfs_group_stats()
98 P(se->avg.avg_period); print_cfs_group_stats()
99 P(se->avg.load_avg_contrib); print_cfs_group_stats()
100 P(se->avg.utilization_avg_contrib); print_cfs_group_stats()
101 P(se->avg.decay_count); print_cfs_group_stats()
642 P(se.avg.runnable_avg_sum); proc_sched_show_task()
643 P(se.avg.running_avg_sum); proc_sched_show_task()
644 P(se.avg.avg_period); proc_sched_show_task()
645 P(se.avg.load_avg_contrib); proc_sched_show_task()
646 P(se.avg.utilization_avg_contrib); proc_sched_show_task()
647 P(se.avg.decay_count); proc_sched_show_task()
H A Dfair.c681 p->se.avg.runnable_avg_sum = p->se.avg.running_avg_sum = slice; init_task_runnable_average()
682 p->se.avg.avg_period = slice; init_task_runnable_average()
1690 delta = p->se.avg.runnable_avg_sum; numa_get_avg_runtime()
1691 *period = p->se.avg.avg_period; numa_get_avg_runtime()
2409 #define LOAD_AVG_MAX 47742 /* maximum possible load avg */
2609 decays -= se->avg.decay_count; __synchronize_entity_decay()
2610 se->avg.decay_count = 0; __synchronize_entity_decay()
2614 se->avg.load_avg_contrib = decay_load(se->avg.load_avg_contrib, decays); __synchronize_entity_decay()
2615 se->avg.utilization_avg_contrib = __synchronize_entity_decay()
2616 decay_load(se->avg.utilization_avg_contrib, decays); __synchronize_entity_decay()
2670 se->avg.load_avg_contrib = div_u64(contrib, __update_group_entity_contrib()
2698 se->avg.load_avg_contrib *= runnable_avg; __update_group_entity_contrib()
2699 se->avg.load_avg_contrib >>= NICE_0_SHIFT; __update_group_entity_contrib()
2705 __update_entity_runnable_avg(rq_clock_task(rq), cpu_of(rq), &rq->avg, update_rq_runnable_avg()
2707 __update_tg_runnable_avg(&rq->avg, &rq->cfs); update_rq_runnable_avg()
2723 contrib = se->avg.runnable_avg_sum * scale_load_down(se->load.weight); __update_task_entity_contrib()
2724 contrib /= (se->avg.avg_period + 1); __update_task_entity_contrib()
2725 se->avg.load_avg_contrib = scale_load(contrib); __update_task_entity_contrib()
2731 long old_contrib = se->avg.load_avg_contrib; __update_entity_load_avg_contrib()
2736 __update_tg_runnable_avg(&se->avg, group_cfs_rq(se)); __update_entity_load_avg_contrib()
2740 return se->avg.load_avg_contrib - old_contrib; __update_entity_load_avg_contrib()
2749 contrib = se->avg.running_avg_sum * scale_load_down(SCHED_LOAD_SCALE); __update_task_entity_utilization()
2750 contrib /= (se->avg.avg_period + 1); __update_task_entity_utilization()
2751 se->avg.utilization_avg_contrib = scale_load(contrib); __update_task_entity_utilization()
2756 long old_contrib = se->avg.utilization_avg_contrib; __update_entity_utilization_avg_contrib()
2761 se->avg.utilization_avg_contrib = __update_entity_utilization_avg_contrib()
2764 return se->avg.utilization_avg_contrib - old_contrib; __update_entity_utilization_avg_contrib()
2796 if (!__update_entity_runnable_avg(now, cpu, &se->avg, se->on_rq, update_entity_load_avg()
2853 * Newly forked tasks are enqueued with se->avg.decay_count == 0, they enqueue_entity_load_avg()
2857 if (unlikely(se->avg.decay_count <= 0)) { enqueue_entity_load_avg()
2858 se->avg.last_runnable_update = rq_clock_task(rq_of(cfs_rq)); enqueue_entity_load_avg()
2859 if (se->avg.decay_count) { enqueue_entity_load_avg()
2868 se->avg.last_runnable_update -= (-se->avg.decay_count) enqueue_entity_load_avg()
2872 se->avg.decay_count = 0; enqueue_entity_load_avg()
2881 subtract_blocked_load_contrib(cfs_rq, se->avg.load_avg_contrib); enqueue_entity_load_avg()
2885 cfs_rq->runnable_load_avg += se->avg.load_avg_contrib; enqueue_entity_load_avg()
2886 cfs_rq->utilization_load_avg += se->avg.utilization_avg_contrib; enqueue_entity_load_avg()
2904 cfs_rq->runnable_load_avg -= se->avg.load_avg_contrib; dequeue_entity_load_avg()
2905 cfs_rq->utilization_load_avg -= se->avg.utilization_avg_contrib; dequeue_entity_load_avg()
2907 cfs_rq->blocked_load_avg += se->avg.load_avg_contrib; dequeue_entity_load_avg()
2908 se->avg.decay_count = atomic64_read(&cfs_rq->decay_counter); dequeue_entity_load_avg()
4925 if (se->avg.decay_count) { migrate_task_rq_fair()
4926 se->avg.decay_count = -__synchronize_entity_decay(se); migrate_task_rq_fair()
4927 atomic_long_add(se->avg.load_avg_contrib, migrate_task_rq_fair()
5317 * imb_i,j = max{ avg(W/C), W_i/C_i } - min{ avg(W/C), W_j/C_j } (4)
5838 if (!se->avg.runnable_avg_sum && !cfs_rq->nr_running) __update_blocked_averages_cpu()
5900 load = div64_ul(load * se->avg.load_avg_contrib,
5913 return div64_ul(p->se.avg.load_avg_contrib * cfs_rq->h_load, task_h_load()
5923 return p->se.avg.load_avg_contrib; task_h_load()
6036 u64 total, used, age_stamp, avg; scale_rt_capacity() local
6044 avg = ACCESS_ONCE(rq->rt_avg); scale_rt_capacity()
6052 used = div_u64(avg, total); scale_rt_capacity()
6606 * max load less than avg load(as we skip the groups at or below calculate_imbalance()
7931 if (se->avg.decay_count) { switched_from_fair()
7933 subtract_blocked_load_contrib(cfs_rq, se->avg.load_avg_contrib); switched_from_fair()
8043 se->avg.decay_count = atomic64_read(&cfs_rq->decay_counter); task_move_group_fair()
8044 cfs_rq->blocked_load_avg += se->avg.load_avg_contrib; task_move_group_fair()
H A Dproc.c14 * We take a distributed and async approach to calculating the global load-avg
H A Dsched.h592 struct sched_avg avg; member in struct:rq
H A Dcore.c1401 static void update_avg(u64 *avg, u64 sample) update_avg() argument
1403 s64 diff = sample - *avg; update_avg()
1404 *avg += diff >> 3; update_avg()
1807 p->se.avg.decay_count = 0; __sched_fork()
/linux-4.1.27/tools/perf/scripts/perl/Perf-Trace-Util/lib/Perf/Trace/
H A DUtil.pm17 avg nsecs nsecs_secs nsecs_nsecs nsecs_usecs print_nsecs
23 sub avg subroutine
/linux-4.1.27/tools/perf/scripts/perl/
H A Dwakeup-latency.pl5 # Display avg/min/max wakeup latency
72 avg($total_wakeup_latency, $total_wakeups));
/linux-4.1.27/include/linux/mfd/pcf50633/
H A Dadc.h67 pcf50633_adc_async_read(struct pcf50633 *pcf, int mux, int avg,
71 pcf50633_adc_sync_read(struct pcf50633 *pcf, int mux, int avg);
/linux-4.1.27/arch/mips/cavium-octeon/
H A Doct_ilm.c32 u64 cpuclk, avg, max, min; show_latency() local
39 avg = (curr_li.latency_sum * 1000000000) / (cpuclk * curr_li.interrupt_cnt); show_latency()
41 seq_printf(m, "cnt: %10lld, avg: %7lld ns, max: %7lld ns, min: %7lld ns\n", show_latency()
42 curr_li.interrupt_cnt, avg, max, min); show_latency()
/linux-4.1.27/tools/perf/bench/
H A Dfutex-hash.c101 unsigned long avg = avg_stats(&throughput_stats); print_summary() local
105 !silent ? "\n" : "", avg, rel_stddev_stats(stddev, avg), print_summary()
H A Dnuma.c1538 "secs,", "runtime-avg/thread", "secs average thread-runtime"); __bench_numa()
1542 "%,", "spread-runtime/thread", "% difference between max/avg runtime"); __bench_numa()
/linux-4.1.27/drivers/power/
H A Dab8500_fg.c107 int avg; member in struct:ab8500_fg_avg_cap
388 struct ab8500_fg_avg_cap *avg = &di->avg_cap; ab8500_fg_add_cap_sample() local
393 avg->sum += sample - avg->samples[avg->pos]; ab8500_fg_add_cap_sample()
394 avg->samples[avg->pos] = sample; ab8500_fg_add_cap_sample()
395 avg->time_stamps[avg->pos] = ts64.tv_sec; ab8500_fg_add_cap_sample()
396 avg->pos++; ab8500_fg_add_cap_sample()
398 if (avg->pos == NBR_AVG_SAMPLES) ab8500_fg_add_cap_sample()
399 avg->pos = 0; ab8500_fg_add_cap_sample()
401 if (avg->nbr_samples < NBR_AVG_SAMPLES) ab8500_fg_add_cap_sample()
402 avg->nbr_samples++; ab8500_fg_add_cap_sample()
408 } while (ts64.tv_sec - VALID_CAPACITY_SEC > avg->time_stamps[avg->pos]); ab8500_fg_add_cap_sample()
410 avg->avg = avg->sum / avg->nbr_samples; ab8500_fg_add_cap_sample()
412 return avg->avg; ab8500_fg_add_cap_sample()
424 struct ab8500_fg_avg_cap *avg = &di->avg_cap; ab8500_fg_clear_cap_samples() local
426 avg->pos = 0; ab8500_fg_clear_cap_samples()
427 avg->nbr_samples = 0; ab8500_fg_clear_cap_samples()
428 avg->sum = 0; ab8500_fg_clear_cap_samples()
429 avg->avg = 0; ab8500_fg_clear_cap_samples()
432 avg->samples[i] = 0; ab8500_fg_clear_cap_samples()
433 avg->time_stamps[i] = 0; ab8500_fg_clear_cap_samples()
448 struct ab8500_fg_avg_cap *avg = &di->avg_cap; ab8500_fg_fill_cap_sample() local
453 avg->samples[i] = sample; ab8500_fg_fill_cap_sample()
454 avg->time_stamps[i] = ts64.tv_sec; ab8500_fg_fill_cap_sample()
457 avg->pos = 0; ab8500_fg_fill_cap_sample()
458 avg->nbr_samples = NBR_AVG_SAMPLES; ab8500_fg_fill_cap_sample()
459 avg->sum = sample * NBR_AVG_SAMPLES; ab8500_fg_fill_cap_sample()
460 avg->avg = sample; ab8500_fg_fill_cap_sample()
2015 * ab8500_fg_cc_convend_handler() - isr to get battery avg current.
H A Dbq27x00_battery.c414 * Read a power avg register.
423 dev_err(di->dev, "error reading power avg rgister %02x: %d\n", bq27x00_battery_read_pwr_avg()
/linux-4.1.27/drivers/cpuidle/governors/
H A Dmenu.c203 uint64_t avg, stddev; get_typical_interval() local
211 avg = 0; get_typical_interval()
216 avg += value; get_typical_interval()
223 avg >>= INTERVAL_SHIFT; get_typical_interval()
225 do_div(avg, divisor); get_typical_interval()
232 int64_t diff = value - avg; get_typical_interval()
255 if (((avg > stddev * 6) && (divisor * 4 >= INTERVALS * 3)) get_typical_interval()
257 if (data->next_timer_us > avg) get_typical_interval()
258 data->predicted_us = avg; get_typical_interval()
/linux-4.1.27/arch/parisc/kernel/
H A Dirq.c209 seq_printf(p, " [min/avg/max] (CPU cycle counts)"); show_interrupts()
238 unsigned int k, avg, min, max; show_interrupts() local
242 for (avg = k = 0; k < PARISC_CR16_HIST_SIZE; k++) { show_interrupts()
246 avg += hist; show_interrupts()
254 avg /= k; show_interrupts()
256 min,avg,max); show_interrupts()
/linux-4.1.27/drivers/platform/x86/
H A Dintel_ips.c639 int avg; cpu_exceeded() local
643 avg = cpu ? ips->ctv2_avg_temp : ips->ctv1_avg_temp; cpu_exceeded()
644 if (avg > (ips->limits->core_temp_limit * 100)) cpu_exceeded()
832 u16 avg; calc_avg_temp() local
839 avg = (u16)total; calc_avg_temp()
841 return avg; calc_avg_temp()
908 static u16 update_average_temp(u16 avg, u16 val) update_average_temp() argument
914 (((temp_decay_factor - 1) * avg) / temp_decay_factor); update_average_temp()
919 static u16 update_average_power(u32 avg, u32 val) update_average_power() argument
924 (((power_decay_factor - 1) * avg) / power_decay_factor); update_average_power()
932 u32 avg; calc_avg_power() local
939 avg = (u32)total; calc_avg_power()
941 return avg; calc_avg_power()
1043 * Ok, now we have an initial avg. From here on out, we track the ips_monitor()
1044 * running avg using a decaying average calculation. This allows ips_monitor()
/linux-4.1.27/drivers/hwmon/
H A Dina2xx.c147 int avg = ina226_avg_tab[INA226_READ_AVG(config)]; ina226_reg_to_interval() local
153 return DIV_ROUND_CLOSEST(avg * INA226_TOTAL_CONV_TIME_DEFAULT, 1000); ina226_reg_to_interval()
158 int avg, avg_bits; ina226_interval_to_reg() local
160 avg = DIV_ROUND_CLOSEST(interval * 1000, ina226_interval_to_reg()
162 avg_bits = find_closest(avg, ina226_avg_tab, ina226_interval_to_reg()
H A Dlm93.c235 u8 avg; member in struct:lm93_data::__anon4706
1072 data->block4[i].avg = lm93_update_client_min()
2254 return sprintf(buf, "%d\n", data->block4[nr].avg); show_prochot_avg()
/linux-4.1.27/drivers/iio/adc/
H A Dtwl4030-madc.c181 .avg = TWL4030_MADC_RTAVERAGE_LSB,
186 .avg = TWL4030_MADC_SW1AVERAGE_LSB,
192 .avg = TWL4030_MADC_SW2AVERAGE_LSB,
594 method->avg); twl4030_madc_conversion()
597 "unable to write avg register 0x%X\n", twl4030_madc_conversion()
598 method->avg); twl4030_madc_conversion()
H A Dqcom-spmi-vadc.c792 ret = of_property_read_u32(node, "qcom,avg-samples", &value); vadc_get_dt_channel_data()
796 dev_err(dev, "%02x invalid avg-samples %d\n", vadc_get_dt_channel_data()
/linux-4.1.27/drivers/net/wireless/rt2x00/
H A Drt2x00link.c42 unsigned long avg; rt2x00link_get_avg_rssi() local
44 avg = ewma_read(ewma); rt2x00link_get_avg_rssi()
45 if (avg) rt2x00link_get_avg_rssi()
46 return -avg; rt2x00link_get_avg_rssi()
/linux-4.1.27/include/uapi/linux/
H A Dam437x-vpfe.h37 /* enum for No of pixel per line to be avg. in Black Clamping*/
/linux-4.1.27/include/linux/i2c/
H A Dtwl4030-madc.h28 u8 avg; member in struct:twl4030_madc_conversion_method
/linux-4.1.27/drivers/devfreq/
H A Dtegra-devfreq.c99 /* Define the watermark bounds when applied to the current avg */
220 u32 avg = dev->avg_count; tegra_devfreq_update_avg_wmark() local
224 device_writel(dev, avg + band, ACTMON_DEV_AVG_UPPER_WMARK); tegra_devfreq_update_avg_wmark()
226 avg = max(dev->avg_count, band); tegra_devfreq_update_avg_wmark()
227 device_writel(dev, avg - band, ACTMON_DEV_AVG_LOWER_WMARK); tegra_devfreq_update_avg_wmark()
/linux-4.1.27/drivers/net/wireless/brcm80211/brcmsmac/phy/
H A Dphy_lcn.c4029 s16 avg = 0; wlc_lcnphy_tempsense_new() local
4044 avg = (s16) (tempsenseval1 - 512); wlc_lcnphy_tempsense_new()
4046 avg = (s16) tempsenseval1; wlc_lcnphy_tempsense_new()
4049 avg += (s16) (tempsenseval2 - 512); wlc_lcnphy_tempsense_new()
4051 avg += (s16) tempsenseval2; wlc_lcnphy_tempsense_new()
4053 avg /= 2; wlc_lcnphy_tempsense_new()
4065 return avg; wlc_lcnphy_tempsense_new()
4071 s32 avg = 0; wlc_lcnphy_tempsense() local
4088 avg = (int)(tempsenseval1 - 512); wlc_lcnphy_tempsense()
4090 avg = (int)tempsenseval1; wlc_lcnphy_tempsense()
4094 avg = (int)(avg - tempsenseval2 + 512); wlc_lcnphy_tempsense()
4096 avg = (int)(avg - tempsenseval2); wlc_lcnphy_tempsense()
4099 avg = (int)(avg + tempsenseval2 - 512); wlc_lcnphy_tempsense()
4101 avg = (int)(avg + tempsenseval2); wlc_lcnphy_tempsense()
4102 avg = avg / 2; wlc_lcnphy_tempsense()
4104 if (avg < 0) wlc_lcnphy_tempsense()
4105 avg = avg + 512; wlc_lcnphy_tempsense()
4108 avg = tempsenseval1; wlc_lcnphy_tempsense()
4123 return (u16) avg; wlc_lcnphy_tempsense()
4139 s32 avg = 0; wlc_lcnphy_vbatsense() local
4154 avg = (s32) (vbatsenseval - 512); wlc_lcnphy_vbatsense()
4156 avg = (s32) vbatsenseval; wlc_lcnphy_vbatsense()
4158 avg = (avg * LCN_VBAT_SCALE_NOM + wlc_lcnphy_vbatsense()
4165 return (s8) avg; wlc_lcnphy_vbatsense()
/linux-4.1.27/include/media/davinci/
H A Ddm644x_ccdc.h23 /* enum for No of pixel per line to be avg. in Black Clamping*/
H A Ddm355_ccdc.h23 /* enum for No of pixel per line to be avg. in Black Clamping */
/linux-4.1.27/drivers/net/ethernet/mellanox/mlx5/core/
H A Ddebugfs.c223 stats->avg = debugfs_create_file("average", 0400, mlx5_cmdif_debugfs_init()
226 if (!stats->avg) { mlx5_cmdif_debugfs_init()
/linux-4.1.27/drivers/parisc/
H A Dccio-dma.c319 ** o Most IOVA's are "temporary" - avg search time should be small.
1029 unsigned long avg = 0, min, max; ccio_proc_info() local
1053 avg += ioc->avg_search[j]; ccio_proc_info()
1059 avg /= CCIO_SEARCH_SAMPLE; ccio_proc_info()
1060 seq_printf(m, " Bitmap search : %ld/%ld/%ld (min/avg/max CPU Cycles)\n", ccio_proc_info()
1061 min, avg, max); ccio_proc_info()
1063 seq_printf(m, "pci_map_single(): %8ld calls %8ld pages (avg %d/1000)\n", ccio_proc_info()
1070 seq_printf(m, "pci_unmap_single: %8ld calls %8ld pages (avg %d/1000)\n", ccio_proc_info()
1073 seq_printf(m, "pci_map_sg() : %8ld calls %8ld pages (avg %d/1000)\n", ccio_proc_info()
1077 seq_printf(m, "pci_unmap_sg() : %8ld calls %8ld pages (avg %d/1000)\n\n\n", ccio_proc_info()
H A Dsba_iommu.c1774 unsigned long avg = 0, min, max; sba_proc_info() local
1808 avg += ioc->avg_search[i]; sba_proc_info()
1812 avg /= SBA_SEARCH_SAMPLE; sba_proc_info()
1813 seq_printf(m, " Bitmap search : %ld/%ld/%ld (min/avg/max CPU Cycles)\n", sba_proc_info()
1814 min, avg, max); sba_proc_info()
1816 seq_printf(m, "pci_map_single(): %12ld calls %12ld pages (avg %d/1000)\n", sba_proc_info()
1823 seq_printf(m, "pci_unmap_single: %12ld calls %12ld pages (avg %d/1000)\n", sba_proc_info()
1826 seq_printf(m, "pci_map_sg() : %12ld calls %12ld pages (avg %d/1000)\n", sba_proc_info()
1830 seq_printf(m, "pci_unmap_sg() : %12ld calls %12ld pages (avg %d/1000)\n", sba_proc_info()
/linux-4.1.27/kernel/locking/
H A Dlockdep_proc.c555 "waittime-avg", seq_header()
561 "holdtime-avg"); seq_header()
/linux-4.1.27/drivers/mmc/host/
H A Dsdhci-esdhc-imx.c714 int min, max, avg, ret; esdhc_executing_tuning() local
737 avg = (min + max) / 2; esdhc_executing_tuning()
738 esdhc_prepare_tuning(host, avg); esdhc_executing_tuning()
743 ret ? "failed" : "passed", avg, ret); esdhc_executing_tuning()
/linux-4.1.27/drivers/staging/rtl8723au/include/
H A Drtw_recv.h74 u8 avg_val; /* avg of valid elements */
/linux-4.1.27/drivers/staging/rtl8188eu/include/
H A Drtw_recv.h82 u8 avg_val; /* avg of valid elements */
/linux-4.1.27/drivers/pps/generators/
H A Dpps_gen_parport.c269 pr_info("hrtimer avg error is %ldns\n", hrtimer_error); pps_gen_parport_exit()
/linux-4.1.27/arch/ia64/lib/
H A Dclear_user.S72 // worst case 16 iterations, avg 8 iterations
/linux-4.1.27/tools/power/cpupower/utils/idle_monitor/
H A Dmperf_monitor.c182 dprint("avg freq: %llu\n", *count); mperf_get_count_freq()
/linux-4.1.27/drivers/usb/dwc2/
H A Dhcd.c2013 dev_dbg(hsotg->dev, " samples %u, accum %llu, avg %llu\n", dwc2_hcd_dump_frrem()
2019 dev_dbg(hsotg->dev, " samples %u, accum %llu, avg %llu\n", dwc2_hcd_dump_frrem()
2025 dev_dbg(hsotg->dev, " samples %u, accum %llu, avg %llu\n", dwc2_hcd_dump_frrem()
2031 dev_dbg(hsotg->dev, " samples %u, accum %llu, avg %llu\n", dwc2_hcd_dump_frrem()
2039 dev_dbg(hsotg->dev, " samples %u, accum %llu, avg %llu\n", dwc2_hcd_dump_frrem()
2044 dev_dbg(hsotg->dev, " samples %u, accum %llu, avg %llu\n", dwc2_hcd_dump_frrem()
2049 dev_dbg(hsotg->dev, " samples %u, accum %llu, avg %llu\n", dwc2_hcd_dump_frrem()
2056 dev_dbg(hsotg->dev, " samples %u, accum %llu, avg %llu\n", dwc2_hcd_dump_frrem()
2061 dev_dbg(hsotg->dev, " samples %u, accum %llu, avg %llu\n", dwc2_hcd_dump_frrem()
2066 dev_dbg(hsotg->dev, " samples %u, accum %llu, avg %llu\n", dwc2_hcd_dump_frrem()
/linux-4.1.27/mm/
H A Dpage-writeback.c850 unsigned long avg = bdi->avg_write_bandwidth; bdi_update_write_bandwidth() local
868 avg = bw; bdi_update_write_bandwidth()
877 if (avg > old && old >= (unsigned long)bw) bdi_update_write_bandwidth()
878 avg -= (avg - old) >> 3; bdi_update_write_bandwidth()
880 if (avg < old && old <= (unsigned long)bw) bdi_update_write_bandwidth()
881 avg += (old - avg) >> 3; bdi_update_write_bandwidth()
885 bdi->avg_write_bandwidth = avg; bdi_update_write_bandwidth()
/linux-4.1.27/drivers/ide/
H A Dpalm_bk3710.c64 unsigned int cycletime; /* tCYCTYP2/2 -- avg Cycle Time (nsec) */
/linux-4.1.27/drivers/watchdog/
H A DiTCO_vendor_support.c247 * These are the conclusions of Andriy Gapon <avg@icyb.net.ua> after
/linux-4.1.27/fs/f2fs/
H A Ddebug.c318 seq_printf(s, "\nBDF: %u, avg. vblocks: %u\n", stat_show()
/linux-4.1.27/arch/ia64/hp/common/
H A Dsba_iommu.c1924 unsigned long i = 0, avg = 0, min, max; ioc_show() local
1927 avg += ioc->avg_search[i]; ioc_show()
1931 avg /= SBA_SEARCH_SAMPLE; ioc_show()
1932 seq_printf(s, "Bitmap search : %ld/%ld/%ld (min/avg/max CPU Cycles/IOVA page)\n", ioc_show()
1933 min, avg, max); ioc_show()
/linux-4.1.27/include/trace/events/
H A Dwriteback.h417 __entry->avg_write_bw, /* avg write bandwidth */
/linux-4.1.27/net/sched/
H A Dsch_sfb.c199 * compute max qlen, max p_mark, and avg p_mark
/linux-4.1.27/drivers/media/platform/davinci/
H A Ddm644x_ccdc.c465 * Configure gain, Start pixel, No of line to be avg, ccdc_config_black_clamp()
466 * No of pixel/line to be avg, & Enable the Black clamping ccdc_config_black_clamp()
/linux-4.1.27/net/tipc/
H A Dnetlink_compat.c446 " Congestion link:%u Send queue max:%u avg:%u", __fill_bc_link_stat()
555 " Congestion link:%u Send queue max:%u avg:%u", tipc_nl_compat_link_stat_dump()
/linux-4.1.27/drivers/net/wireless/ipw2x00/
H A Dipw2200.c4096 static void inline average_init(struct average *avg) average_init() argument
4098 memset(avg, 0, sizeof(*avg)); average_init()
4108 static void average_add(struct average *avg, s16 val) average_add() argument
4110 avg->sum -= avg->entries[avg->pos]; average_add()
4111 avg->sum += val; average_add()
4112 avg->entries[avg->pos++] = val; average_add()
4113 if (unlikely(avg->pos == AVG_ENTRIES)) { average_add()
4114 avg->init = 1; average_add()
4115 avg->pos = 0; average_add()
4119 static s16 average_value(struct average *avg) average_value() argument
4121 if (!unlikely(avg->init)) { average_value()
4122 if (avg->pos) average_value()
4123 return avg->sum / avg->pos; average_value()
4127 return avg->sum / AVG_ENTRIES; average_value()
H A Dipw2100.h1040 IPW_ORD_RSSI_AVG_CURR = 173, // Current avg RSSI
H A Dipw2100.c3755 IPW2100_ORD(RSSI_AVG_CURR, "Current avg RSSI"),
/linux-4.1.27/drivers/net/
H A Dvirtio_net.c1661 struct ewma *avg; mergeable_rx_buffer_size_show() local
1664 avg = &vi->rq[queue_index].mrg_avg_pkt_len; mergeable_rx_buffer_size_show()
1665 return sprintf(buf, "%u\n", get_mergeable_buf_len(avg)); mergeable_rx_buffer_size_show()
/linux-4.1.27/drivers/staging/lustre/lustre/llite/
H A Dlloop.c452 CDEBUG(D_INFO, "total: %lu, count: %lu, avg: %lu\n", loop_thread()
/linux-4.1.27/drivers/net/wireless/b43/
H A Dxmit.c752 /* Broadcom has code for min and avg, but always uses max */ b43_rx()
/linux-4.1.27/include/linux/mlx5/
H A Ddriver.h228 struct dentry *avg; member in struct:mlx5_cmd_stats
/linux-4.1.27/drivers/mtd/nand/
H A Dnandsim.c455 unsigned long wmin = -1, wmax = 0, avg; nandsim_debugfs_show() local
484 avg = tot / wear_eb_count; nandsim_debugfs_show()
489 seq_printf(m, "Average number of erases: %lu\n", avg); nandsim_debugfs_show()
/linux-4.1.27/drivers/net/wireless/iwlwifi/mvm/
H A Dcoex.c649 /* try to get the avg rssi from fw */ iwl_mvm_bt_notif_iterator()
H A Dcoex_legacy.c961 /* try to get the avg rssi from fw */ iwl_mvm_bt_notif_iterator()
/linux-4.1.27/drivers/net/wireless/rsi/
H A Drsi_91x_mac80211.c880 /* CQM only for connected AP beacons, the RSSI is a weighted avg */ rsi_fill_rx_status()
/linux-4.1.27/drivers/net/wireless/brcm80211/brcmsmac/
H A Dampdu.c91 * dmaxferrate: estimated dma avg xfer rate in kbits/sec
/linux-4.1.27/drivers/infiniband/hw/ipath/
H A Dipath_common.h146 /* avg number of packets handled per receive call */
/linux-4.1.27/drivers/media/platform/am437x/
H A Dam437x-vpfe.c617 * Configure gain, Start pixel, No of line to be avg, vpfe_ccdc_config_black_clamp()
618 * No of pixel/line to be avg, & Enable the Black clamping vpfe_ccdc_config_black_clamp()
/linux-4.1.27/drivers/net/wireless/ath/ath6kl/
H A Ddebug.c664 "Beacon avg rssi", tgt_stats->cs_ave_beacon_rssi); read_file_tgt_stats()
/linux-4.1.27/drivers/net/fddi/skfp/
H A Dpcmplc.c1134 DB_PCMN(1,"avg. BER : 10E-%d\n", lem_evaluate()
/linux-4.1.27/drivers/scsi/bfa/
H A Dbfa_defs_svc.h1207 u32 avg[BFA_IOBUCKET_MAX]; member in struct:bfa_itnim_latency_s
H A Dbfa_fcpim.c461 io_lat->avg[idx] += val; bfa_ioim_profile_comp()
/linux-4.1.27/drivers/staging/lustre/lustre/ldlm/
H A Dldlm_pool.c1208 * Set the modest pools limit equal to their avg granted list_for_each_entry()
/linux-4.1.27/drivers/staging/lustre/lustre/obdclass/
H A Dlprocfs_status.c790 /* avg data rates */ lprocfs_rd_import()
/linux-4.1.27/drivers/net/wireless/ti/wlcore/
H A Dacx.c1275 wl1271_debug(DEBUG_ACX, "acx rssi snr avg weights"); wl1271_acx_rssi_snr_avg_weights()
/linux-4.1.27/net/netfilter/ipvs/
H A Dip_vs_sync.c1668 * the load avg. sync_thread_master()
/linux-4.1.27/drivers/staging/wlan-ng/
H A Dprism2sta.c1146 pr_debug("chinfo: channel %d, %s level (avg/peak)=%d/%d dB, pcf %d\n", prism2sta_inf_chinforesults()
/linux-4.1.27/drivers/phy/
H A Dphy-xgene.c1448 dev_dbg(ctx->dev, "Generating avg calibration value for lane %d\n", xgene_phy_gen_avg_val()
/linux-4.1.27/scripts/
H A Danalyze_suspend.py2041 tr.avg td {background-color:#BDE34C;}\n\
2132 html += '<tr class="avg">\n'
/linux-4.1.27/fs/btrfs/
H A Dextent-tree.c2562 u64 avg; __btrfs_run_delayed_refs() local
2569 avg = fs_info->avg_delayed_ref_runtime * 3 + runtime; __btrfs_run_delayed_refs()
2570 fs_info->avg_delayed_ref_runtime = avg >> 2; /* div by 4 */ __btrfs_run_delayed_refs()
/linux-4.1.27/kernel/debug/kdb/
H A Dkdb_main.c2576 kdb_printf("load avg %ld.%02ld %ld.%02ld %ld.%02ld\n", kdb_summary()
/linux-4.1.27/drivers/media/usb/gspca/
H A Dov519.c1454 { 0x4f, 0x07 }, /* UV avg., col. killer: max */
/linux-4.1.27/drivers/gpu/drm/radeon/
H A Dci_dpm.c5903 seq_printf(m, "power level avg sclk: %u mclk: %u\n", ci_dpm_debugfs_print_current_performance_level()
/linux-4.1.27/fs/jfs/
H A Djfs_dmap.c641 /* Less than avg. freespace, but best so far */ dbNextAG()

Completed in 3188 milliseconds