函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\readahead.c Create Date:2022-07-27 15:35:45
Last Modify:2020-03-17 21:13:07 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Set the initial window size, round to next power of 2 and square* for small size, x 4 for medium, and x 2 for large* for 128k (32 page) max ra* 1-8 page = 32k initial, > 8 page = 128k initial

函数原型:static unsigned long get_init_ra_size(unsigned long size, unsigned long max)

返回类型:unsigned long

参数:

类型参数名称
unsigned longsize
unsigned longmax
259  newsize等于undup_pow_of_two - round the given value up to nearest power of two*@n: parameter* round the given value up to the nearest power of two* - the result is undefined when n == 0* - this can be used to initialise global variables from constant data(size)
261  如果newsize小于等于max除32则newsize等于newsize乘4
263  否则如果newsize小于等于max除4则newsize等于newsize乘2
265  否则newsize等于max
268  返回:newsize
调用者
名称描述
ondemand_readaheadA minimal readahead algorithm for trivial sequential/random reads.