函数逻辑报告 |
Source Code:mm\vmscan.c |
Create Date:2022-07-27 15:42:47 |
Last Modify:2022-05-23 13:41:30 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:Determine how aggressively the anon and file LRU lists should be* scanned
函数原型:static void get_scan_count(struct lruvec *lruvec, struct scan_control *sc, unsigned long *nr)
返回类型:void
参数:
类型 | 参数 | 名称 |
---|---|---|
struct lruvec * | lruvec | |
struct scan_control * | sc | |
unsigned long * | nr |
2247 | memcg等于lruvec_memcg(lruvec) |
2248 | swappiness等于mem_cgroup_swappiness(memcg) |
2249 | reclaim_stat等于reclaim_stat |
2251 | denominator等于0 |
2252 | pgdat等于lruvec_pgdat(lruvec) |
2260 | 如果非 Can pages be swapped as part of reclaim? 或mem_cgroup_get_nr_swap_pages(memcg)小于等于0则 |
2261 | scan_balance等于SCAN_FILE |
2262 | 转到:out |
2272 | 如果cgroup_reclaim(sc)且非swappiness则 |
2273 | scan_balance等于SCAN_FILE |
2274 | 转到:out |
2283 | scan_balance等于SCAN_EQUAL |
2284 | 转到:out |
2291 | scan_balance等于SCAN_ANON |
2292 | 转到:out |
2300 | scan_balance等于SCAN_FILE |
2301 | 转到:out |
2304 | scan_balance等于SCAN_FRACT |
2310 | anon_prio等于swappiness |
2331 | 如果此条件成立可能性小(为编译器优化)(recent_scanned[0] > anon / 4)则 |
2332 | recent_scanned[0]除等于2 |
2336 | 如果此条件成立可能性小(为编译器优化)(recent_scanned[1] > file / 4)则 |
2337 | recent_scanned[1]除等于2 |
2346 | ap等于anon_prio乘recent_scanned[0]加1的和 |
2349 | fp等于file_prio乘recent_scanned[1]加1的和 |
2355 | denominator等于ap加fp加1 |
2356 | out : |
2358 | file等于is_file_lru(lru) |
2363 | lruvec_size等于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) |
2367 | 如果protection则 |
2397 | cgroup_size等于mem_cgroup_size(memcg) |
2400 | cgroup_size等于两数取大(cgroup_size, protection) |
2410 | scan等于两数取大(scan, SWAP_CLUSTER_MAX) |
2411 | 否则 |
2412 | scan等于lruvec_size |
2415 | scan右移等于 Scan (total_size >> priority) pages at once 位 |
2421 | 如果非scan且非mem_cgroup_online(memcg)则scan等于两数取小(lruvec_size, SWAP_CLUSTER_MAX) |
2425 | 当:scan_balance恒等于SCAN_EQUAL |
2427 | 退出 |
2428 | 当:scan_balance恒等于SCAN_FRACT |
2440 | 退出 |
2441 | 当:scan_balance恒等于SCAN_FILE |
2442 | 当:scan_balance恒等于SCAN_ANON |
2449 | 默认 |
2451 | BUG() |
名称 | 描述 |
---|---|
shrink_lruvec |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |