Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Dirty position control

Proto:static void wb_position_ratio(struct dirty_throttle_control *dtc)

Type:void

Parameter:

TypeParameterName
struct dirty_throttle_control *dtc
906  wb = wb
907  write_bw = urther smoothed write bw, > 0
908  freerun = dirty_freerun_ceiling(dirty threshold , dirty background threshold )
909  limit = hard_dirty_limit(dtc_dom(dtc), dirty threshold )
910  wb_thresh = wb_thresh
918  pos_ratio = 0
920  If Value for the false possibility is greater at compile time(le_dirty + write + nfs >= limit) Then Return
928  setpoint = (freerun + limit) / 2
929  pos_ratio = (dirty) := 1
956  If Value for the false possibility is greater at compile time(capabilities & BDI_CAP_STRICTLIMIT) Then
959  If per-wb counterparts < 8 Then
962  Return
965  If per-wb counterparts >= wb_thresh Then Return
968  wb_setpoint = dirty_freerun_ceiling(wb_thresh, wb_bg_thresh)
971  If wb_setpoint == 0 || wb_setpoint == wb_thresh Then Return
974  wb_pos_ratio = (dirty) := 1
998  pos_ratio = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(pos_ratio, wb_pos_ratio)
999  Return
1033  If Value for the false possibility is greater at compile time(wb_thresh > dirty threshold ) Then wb_thresh = dirty threshold
1042  wb_thresh = max - return maximum of two values of the same or compatible types*@x: first value*@y: second value(wb_thresh, (limit - le_dirty + write + nfs ) / 8)
1047  x = div_u64 - unsigned 64bit divide with 32bit divisor*@dividend: unsigned 64bit dividend*@divisor: unsigned 32bit divisor* This is the most common 64bit divide and should be used if possible,* as many 32bit archs can optimize this variant better than a full
1048  wb_setpoint = setpoint * x >> 16
1057  span = ( dirty threshold - wb_thresh + 8 * write_bw ) * x >> 16
1058  x_intercept = wb_setpoint + span
1060  If per-wb counterparts < x_intercept - span / 4 Then
1061  pos_ratio = div64_u64 - unsigned 64bit divide with 64bit divisor*@dividend: 64bit dividend*@divisor: 64bit divisor* This implementation is a modified version of the algorithm proposed* by the book 'Hacker's Delight'. The original source and full proof
1063  Else pos_ratio /= 4
1071  x_intercept = wb_thresh / 2
1072  If per-wb counterparts < x_intercept Then
1073  If per-wb counterparts > x_intercept / 8 Then pos_ratio = div_u64 - unsigned 64bit divide with 32bit divisor*@dividend: unsigned 64bit dividend*@divisor: unsigned 32bit divisor* This is the most common 64bit divide and should be used if possible,* as many 32bit archs can optimize this variant better than a full
1076  Else pos_ratio *= 8
1080  pos_ratio = pos_ratio
Caller
NameDescribe
balance_dirty_pagesalance_dirty_pages() must be called by processes which are generating dirty* data