Lines Matching +full:inter +full:- +full:data

1 // SPDX-License-Identifier: GPL-2.0-only
20 * The latency is stored in fixed sized data structures in an accumulated form;
22 * in the data structure. Both the count, total accumulated latency and maximum
23 * latency are tracked in this data structure. When the fixed size structure is
37 * | | | +----> the stringified backtrace
38 * | | +---------> The maximum latency for this entry in microseconds
39 * | +--------------> The accumulated latency for this entry (microseconds)
40 * +-------------------> The number of times this entry is hit
71 memset(&p->latency_record, 0, sizeof(p->latency_record)); in clear_tsk_latency_tracing()
72 p->latency_record_count = 0; in clear_tsk_latency_tracing()
93 if (!tsk->mm) in account_global_scheduler_latency()
106 unsigned long record = lat->backtrace[q]; in account_global_scheduler_latency()
119 latency_record[i].time += lat->time; in account_global_scheduler_latency()
120 if (lat->time > latency_record[i].max) in account_global_scheduler_latency()
121 latency_record[i].max = lat->time; in account_global_scheduler_latency()
127 if (i >= MAXLR - 1) in account_global_scheduler_latency()
135 * __account_scheduler_latency - record an occurred latency
136 * @tsk - the task struct of the task hitting the latency
137 * @usecs - the duration of the latency in microseconds
138 * @inter - 1 if the sleep was interruptible, 0 if uninterruptible
143 * This function has a few special cases to deal with normal 'non-latency'
151 __account_scheduler_latency(struct task_struct *tsk, int usecs, int inter) in __account_scheduler_latency() argument
158 if (inter && usecs > 5000) in __account_scheduler_latency()
162 /* Zero-time sleeps are non-interesting */ in __account_scheduler_latency()
177 for (i = 0; i < tsk->latency_record_count; i++) { in __account_scheduler_latency()
181 mylat = &tsk->latency_record[i]; in __account_scheduler_latency()
185 if (mylat->backtrace[q] != record) { in __account_scheduler_latency()
195 mylat->count++; in __account_scheduler_latency()
196 mylat->time += lat.time; in __account_scheduler_latency()
197 if (lat.time > mylat->max) in __account_scheduler_latency()
198 mylat->max = lat.time; in __account_scheduler_latency()
206 if (tsk->latency_record_count >= LT_SAVECOUNT) in __account_scheduler_latency()
210 i = tsk->latency_record_count++; in __account_scheduler_latency()
211 memcpy(&tsk->latency_record[i], &lat, sizeof(struct latency_record)); in __account_scheduler_latency()
226 if (lr->backtrace[0]) { in lstats_show()
229 lr->count, lr->time, lr->max); in lstats_show()
231 unsigned long bt = lr->backtrace[q]; in lstats_show()