函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:domain_dirty_limits - calculate thresh and bg_thresh for a wb_domain*@dtc: dirty_throttle_control of interest* Calculate @dtc->thresh and ->bg_thresh considering* vm_dirty_{bytes|ratio} and dirty_background_{bytes|ratio}. The caller

函数原型:static void domain_dirty_limits(struct dirty_throttle_control *dtc)

返回类型:void

参数:

类型参数名称
struct dirty_throttle_control *dtc
395  available_memory等于dirtyable
396  gdtc等于mdtc_gdtc(dtc)
397  bytes等于vm_dirty_bytes starts at 0 (disabled) so that it is a function of* vm_dirty_ratio * the amount of dirtyable memory
398  bg_bytes等于dirty_background_bytes starts at 0 (disabled) so that it is a function of* dirty_background_ratio * the amount of dirtyable memory
400  ratio等于The generator of dirty data starts writeback at this percentagePAGE_SIZE除100
401  bg_ratio等于Start background writeback (via writeback threads) at this percentagePAGE_SIZE除100
407  如果gdtc
408  global_avail等于dirtyable
417  如果bytesratio等于两数取小(DIV_ROUND_UP(bytes, global_avail), PAGE_SIZE)
420  如果bg_bytesbg_ratio等于两数取小(DIV_ROUND_UP(bg_bytes, global_avail), PAGE_SIZE)
423  bytes等于bg_bytes等于0
426  如果bytesthresh等于DIV_ROUND_UP(bytes, PAGE_SIZE)
428  否则thresh等于ratioavailable_memoryPAGE_SIZE
431  如果bg_bytesbg_thresh等于DIV_ROUND_UP(bg_bytes, PAGE_SIZE)
433  否则bg_thresh等于bg_ratioavailable_memoryPAGE_SIZE
436  如果bg_thresh大于等于threshbg_thresh等于thresh除2
438  tsk等于当前进程
439  如果flags按位与Throttle me less: I clean memory rt_task(tsk)则
440  bg_thresh加等于bg_thresh除4加dirty_limit除32
441  thresh加等于thresh除4加dirty_limit除32
443  dirty threshold 等于thresh
444  dirty background threshold 等于bg_thresh
447  如果非gdtctrace_global_dirty_state(bg_thresh, thresh)
调用者
名称描述
global_dirty_limitsglobal_dirty_limits - background-writeback and dirty-throttling thresholds*@pbackground: out parameter for bg_thresh*@pdirty: out parameter for thresh* Calculate bg_thresh and thresh for global_wb_domain. See* domain_dirty_limits() for details.
balance_dirty_pagesalance_dirty_pages() must be called by processes which are generating dirty* data
wb_over_bg_threshwb_over_bg_thresh - does @wb need to be written back?*@wb: bdi_writeback of interest* Determines whether background writeback should keep writing @wb or it's* clean enough.* Return: %true if writeback should continue.