函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:raid6_choose_gen

函数原型:static inline const struct raid6_calls *raid6_choose_gen(void *( *const dptrs)[(65536/((1UL)<<12))+2], const int disks)

返回类型:struct raid6_calls

参数:

类型参数名称
void *( *constdptrs
const intdisks
152  start等于disks右移1位的值减1, stop等于disks减3
156 algo循环
158  如果valid且非valid()则继续下一循环
162  best等于algo
163  退出
166  perf等于0
168  禁止抢占()
169  j0等于jiffies
170 j1等于jiffies恒等于j0循环
171  cpu_relax()
175  perf自加
179  如果perf大于bestgenperf
180  bestgenperf等于perf
181  best等于algo
183  打印信息("raid6: %-8s gen() %5ld MB/s\n", Name of this routine set , (perf * HZ) >> (20 - 16 + RAID6_TIME_JIFFIES_LG2))
186  如果非xor_syndrome则继续下一循环
189  perf等于0
191  禁止抢占()
192  j0等于jiffies
193 j1等于jiffies恒等于j0循环
194  cpu_relax()
199  perf自加
203  如果best恒等于algobestxorperf等于perf
206  打印信息("raid6: %-8s xor() %5ld MB/s\n", Name of this routine set , (perf * HZ) >> (20 - 16 + RAID6_TIME_JIFFIES_LG2 + 1))
211  如果best
212  打印信息("raid6: using algorithm %s gen() %ld MB/s\n", Name of this routine set , (bestgenperf * HZ) >> (20 - 16 + RAID6_TIME_JIFFIES_LG2))
215  如果xor_syndrome打印信息("raid6: .... xor() %ld MB/s, rmw enabled\n", (bestxorperf * HZ) >> (20 - 16 + RAID6_TIME_JIFFIES_LG2 + 1))
218  raid6_call等于best
219  否则打印错误信息("raid6: Yikes! No algorithm found!\n")
222  返回:best
调用者
名称描述
raid6_select_algoThis code uses the gfmul table as convenient data set to abuse