Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\readahead.c Create Date:2022-07-28 14:12:03
Last Modify:2020-03-17 21:13:07 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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

Proto:static unsigned long get_init_ra_size(unsigned long size, unsigned long max)

Type:unsigned long

Parameter:

TypeParameterName
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  If newsize <= max / 32 Then newsize = newsize * 4
263  Else if newsize <= max / 4 Then newsize = newsize * 2
265  Else newsize = max
268  Return newsize
Caller
NameDescribe
ondemand_readaheadA minimal readahead algorithm for trivial sequential/random reads.