函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\workingset.c Create Date:2022-07-27 15:58:41
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:workingset_init

函数原型:static int __init workingset_init(void)

返回类型:int

参数:

579  BUILD_BUG_ON - break compile if a condition is true(BITS_PER_LONG < Double CLOCK lists* Per node, two clock lists are maintained for file pages: the* inactive and the active list. Freshly faulted pages start out at* the head of the inactive list and page reclaim scans pages from the* tail)
587  timestamp_bits等于BITS_PER_LONGDouble CLOCK lists* Per node, two clock lists are maintained for file pages: the* inactive and the active list. Freshly faulted pages start out at* the head of the inactive list and page reclaim scans pages from the* tail
588  max_order等于fls_long(totalram_pages() - 1)
589  如果max_order大于timestamp_bitsEviction timestamps need to be able to cover the full range of* actionable refaults. However, bits are tight in the xarray* entry, and after storing the identifier for the lruvec there might* not be enough left to represent every single actionable refault等于max_ordertimestamp_bits
591  打印信息("workingset: timestamp_bits=%d max_order=%d bucket_order=%u\n", timestamp_bits, max_order, Eviction timestamps need to be able to cover the full range of* actionable refaults. However, bits are tight in the xarray* entry, and after storing the identifier for the lruvec there might* not be enough left to represent every single actionable refault)
594  ret等于Add a shrinker callback to be called from the vm.
595  如果ret则转到:err
597  ret等于__list_lru_init( & Shadow entries reflect the share of the working set that does not* fit into memory, so their number depends on the access pattern of* the workload, true, & Our list_lru->lock is IRQ-safe as it nests inside the IRQ-safe* i_pages lock., & workingset_shadow_shrinker)
599  如果ret则转到:err_list_lru
601  register_shrinker_prepared( & workingset_shadow_shrinker)
602  返回:0
603  err_list_lru :
604  free_prealloced_shrinker( & workingset_shadow_shrinker)
605  err :
606  返回:ret