Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\kyber-iosched.c Create Date:2022-07-28 17:51:44
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Calculate the histogram bucket with the given percentile rank, or -1 if there* aren't enough samples yet.

Proto:static int calculate_percentile(struct kyber_queue_data *kqd, unsigned int sched_domain, unsigned int type, unsigned int percentile)

Type:int

Parameter:

TypeParameterName
struct kyber_queue_data *kqd
unsigned intsched_domain
unsigned inttype
unsigned intpercentile
229  buckets = latency_buckets[sched_domain][type]
230  samples = 0
232  When bucket < KYBER_LATENCY_BUCKETS cycle samples += buckets[bucket]
235  If Not samples Then Return -1
242  If Not latency_timeout[sched_domain] Then latency_timeout[sched_domain] = max - return maximum of two values of the same or compatible types*@x: first value*@y: second value(jiffies + HZ, 1UL)
244  If samples < 500 && ime_is_after_jiffies(a) return true if a is after jiffies (latency_timeout[sched_domain]) Then
246  Return -1
248  latency_timeout[sched_domain] = 0
250  percentile_samples = DIV_ROUND_UP(samples * percentile, 100)
251  When bucket < KYBER_LATENCY_BUCKETS - 1 cycle
252  If buckets[bucket] >= percentile_samples Then Break
254  percentile_samples -= buckets[bucket]
256  memset(buckets, 0, size of latency_buckets[sched_domain][type] )
258  trace_kyber_latency(q, kyber_domain_names[sched_domain], kyber_latency_type_names[type], percentile, bucket + 1, 1 << KYBER_LATENCY_SHIFT, samples)
262  Return bucket
Caller
NameDescribe
kyber_timer_fn