Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\raid6\algos.c Create Date:2022-07-28 07:09:10
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:raid6_choose_gen

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

Type:struct raid6_calls

Parameter:

TypeParameterName
void *( *constdptrs
const intdisks
152  start = (disks >> 1) - 1 , stop = disks - 3
156  When algo cycle
158  If valid && Not valid() Then Continue
162  best = algo
163  Break
166  perf = 0
169  j0 = jiffies
170  When (j1 = jiffies) == j0 cycle
171  cpu_relax()
175  perf++
177  preempt_enable()
179  If perf > bestgenperf Then
180  bestgenperf = perf
181  best = algo
183  pr_info("raid6: %-8s gen() %5ld MB/s\n", Name of this routine set , (perf * HZ) >> (20 - 16 + RAID6_TIME_JIFFIES_LG2))
186  If Not xor_syndrome Then Continue
189  perf = 0
192  j0 = jiffies
193  When (j1 = jiffies) == j0 cycle
194  cpu_relax()
201  preempt_enable()
203  If best == algo Then bestxorperf = perf
206  pr_info("raid6: %-8s xor() %5ld MB/s\n", Name of this routine set , (perf * HZ) >> (20 - 16 + RAID6_TIME_JIFFIES_LG2 + 1))
211  If best Then
212  pr_info("raid6: using algorithm %s gen() %ld MB/s\n", Name of this routine set , (bestgenperf * HZ) >> (20 - 16 + RAID6_TIME_JIFFIES_LG2))
215  If xor_syndrome Then pr_info("raid6: .... xor() %ld MB/s, rmw enabled\n", (bestxorperf * HZ) >> (20 - 16 + RAID6_TIME_JIFFIES_LG2 + 1))
218  raid6_call = best
219  Else pr_err("raid6: Yikes! No algorithm found!\n")
222  Return best
Caller
NameDescribe
raid6_select_algoThis code uses the gfmul table as convenient data set to abuse