Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\page-writeback.c Create Date:2022-07-28 14:10:15
Last Modify:2022-05-23 13:25:58 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:wb_min_pause

Proto:static long wb_min_pause(struct bdi_writeback *wb, long max_pause, unsigned long task_ratelimit, unsigned long dirty_ratelimit, int *nr_dirtied_pause)

Type:long

Parameter:

TypeParameterName
struct bdi_writeback *wb
longmax_pause
unsigned longtask_ratelimit
unsigned longdirty_ratelimit
int *nr_dirtied_pause
1444  hi = log2 - log base 2 of 32-bit or a 64-bit unsigned value*@n: parameter* constant-capable log of base 2 calculation* - this can be used to initialise global variables from constant data, hence* the massive ternary operator construction* selects the (urther smoothed write bw, > 0 )
1445  lo = log2 - log base 2 of 32-bit or a 64-bit unsigned value*@n: parameter* constant-capable log of base 2 calculation* - this can be used to initialise global variables from constant data, hence* the massive ternary operator construction* selects the (The base dirty throttle rate, re-calculated on every 200ms.* All the bdi tasks' dirty rate will be curbed under it.*@dirty_ratelimit tracks the estimated @balanced_dirty_ratelimit* in small steps and is much more smooth/stable than the latter.)
1451  t = max - return maximum of two values of the same or compatible types*@x: first value*@y: second value(1, HZ / 100)
1459  If hi > lo Then t += (hi - lo) * 10 * HZ / 1024
1480  t = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(t, 1 + max_pause / 2)
1481  pages = dirty_ratelimit * t / 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(HZ)
1491  If pages < Try to keep balance_dirty_pages() call intervals higher than this many pages* by raising pause time to max_pause when falls below it. Then
1492  t = max_pause
1493  pages = dirty_ratelimit * t / 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(HZ)
1500  pause = HZ * pages / (task_ratelimit + 1)
1501  If pause > max_pause Then
1502  t = max_pause
1503  pages = task_ratelimit * t / 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(HZ)
1506  nr_dirtied_pause = pages
1510  Return If pages >= Try to keep balance_dirty_pages() call intervals higher than this many pages* by raising pause time to max_pause when falls below it. Then 1 + t / 2 Else t
Caller
NameDescribe
balance_dirty_pagesalance_dirty_pages() must be called by processes which are generating dirty* data