函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\vmscan.c Create Date:2022-07-27 15:41:02
Last Modify:2022-05-23 13:41:30 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:lruvec_lru_size - Returns the number of pages on the given LRU list.*@lruvec: lru vector*@lru: lru to use*@zone_idx: zones to consider (use MAX_NR_ZONES for the whole LRU list)

函数原型:unsigned long lruvec_lru_size(struct lruvec *lruvec, enum lru_list lru, int zone_idx)

返回类型:unsigned long

参数:

类型参数名称
struct lruvec *lruvec
enum lru_listlru
intzone_idx
330  size等于0
333 zid小于等于zone_idxzid小于MAX_NR_ZONES循环
334  zone等于包含了结点中各内存域的数据结构[zid]
336  如果非Returns true if a zone has pages managed by the buddy allocator.* All the reclaim decisions have to use this function rather than* populated_zone(). If the whole zone is reserved then we can easily* end up with populated_zone() && !managed_zone().则继续下一循环
339  如果非mem_cgroup_disabled()则size加等于mem_cgroup_get_zone_lru_size(lruvec, lru, zid)
341  否则size加等于zone_page_state(zone, NR_ZONE_LRU_BASE + lru)
344  返回:size
调用者
名称描述
get_scan_countDetermine how aggressively the anon and file LRU lists should be* scanned