函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\kyber-iosched.c Create Date:2022-07-27 19:27:29
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

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

函数原型:static int calculate_percentile(struct kyber_queue_data *kqd, unsigned int sched_domain, unsigned int type, unsigned int percentile)

返回类型:int

参数:

类型参数名称
struct kyber_queue_data *kqd
unsigned intsched_domain
unsigned inttype
unsigned intpercentile
229  buckets等于latency_buckets[sched_domain][type]
230  samples等于0
232 bucket小于KYBER_LATENCY_BUCKETS循环samples加等于buckets[bucket]
235  如果非samples则返回:负1
242  如果非latency_timeout[sched_domain]则latency_timeout[sched_domain]等于两数取大(jiffies + HZ, 1UL)
244  如果samples小于500且ime_is_after_jiffies(a) return true if a is after jiffies (latency_timeout[sched_domain])则
246  返回:负1
248  latency_timeout[sched_domain]等于0
250  percentile_samples等于DIV_ROUND_UP(samples * percentile, 100)
251 bucket小于KYBER_LATENCY_BUCKETS减1循环
252  如果buckets[bucket]大于等于percentile_samples退出
254  percentile_samples减等于buckets[bucket]
256  memset(buckets, 0, 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  返回:bucket
调用者
名称描述
kyber_timer_fn