Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\percpu.c Create Date:2022-07-28 14:27:43
Last Modify:2022-05-23 13:52:24 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:pcpu_dump_alloc_info - print out information about pcpu_alloc_info*@lvl: loglevel*@ai: allocation info to dump* Print out information about @ai using loglevel @lvl.

Proto:static void pcpu_dump_alloc_info(const char *lvl, const struct pcpu_alloc_info *ai)

Type:void

Parameter:

TypeParameterName
const char *lvl
const struct pcpu_alloc_info *ai
2170  group_width = 1 , cpu_width = 1
2171  empty_str[] = "--------"
2172  alloc = 0 , alloc_end = 0
2176  v = 0 if grouping unnecessary
2177  When v /= 10 cycle
2178  group_width++
2180  v = num_possible_cpus()
2181  When v /= 10 cycle
2182  cpu_width++
2183  empty_str[min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(int, cpu_width, size of empty_str - 1)] = '\0'
2185  upa = alloc_size / unit_size
2186  width = upa * (cpu_width + 1) + group_width + 3
2187  apl = unddown_pow_of_two - round the given value down to nearest power of two*@n: parameter* round the given value down to the nearest power of two* - the result is undefined when n == 0* - this can be used to initialise global variables from constant data(max - return maximum of two values of the same or compatible types*@x: first value*@y: second value(60 / width, 1))
2189  printk - print a kernel message*@fmt: format string* This is printk(). It can be called from any context. We want it to work.* We try to grab the console_lock. If we succeed, it's easy - we log the* output and call the console drivers
2193  When group < 0 if grouping unnecessary cycle
2194  gi = groups[group]
2195  unit = 0 , unit_end = 0
2197  BUG_ON( aligned # of units % upa)
2198  When alloc < alloc_end cycle
2200  If Not (alloc % apl) Then
2214  Like KERN_CONT, pr_cont() should only be used when continuing* a line with no newline ('\n') enclosed. Otherwise it defaults* back to KERN_DEFAULT.("\n")
Caller
NameDescribe
pcpu_setup_first_chunkpcpu_setup_first_chunk - initialize the first percpu chunk*@ai: pcpu_alloc_info describing how to percpu area is shaped*@base_addr: mapped address* Initialize the first percpu chunk which contains the kernel static* percpu area