函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\page-writeback.c Create Date:2022-07-27 15:33:48
Last Modify:2022-05-23 13:25:58 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:wb_min_pause

函数原型:static long wb_min_pause(struct bdi_writeback *wb, long max_pause, unsigned long task_ratelimit, unsigned long dirty_ratelimit, int *nr_dirtied_pause)

返回类型:long

参数:

类型参数名称
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等于两数取大(1, HZ / 100)
1459  如果hi大于lot加等于hilo的差乘10乘HZ除1024
1480  t等于两数取小(t, 1 + max_pause / 2)
1481  pages等于dirty_ratelimittundup_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  如果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.
1492  t等于max_pause
1493  pages等于dirty_ratelimittundup_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等于HZpagestask_ratelimit加1的和
1501  如果pause大于max_pause
1502  t等于max_pause
1503  pages等于task_ratelimittundup_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  返回:如果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.则1加t除2否则t
调用者
名称描述
balance_dirty_pagesalance_dirty_pages() must be called by processes which are generating dirty* data