Function report |
Source Code:mm\vmscan.c |
Create Date:2022-07-28 14:19:00 |
| Last Modify:2022-05-23 13:41:30 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:shrink_lruvec
Proto:static void shrink_lruvec(struct lruvec *lruvec, struct scan_control *sc)
Type:void
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct lruvec * | lruvec | |
| struct scan_control * | sc |
| 2464 | nr_reclaimed = 0 |
| 2472 | No 3D Now!(targets, nr, size of nr ) |
| 2488 | blk_start_plug( & plug) |
| 2489 | When nr[LRU_INACTIVE_ANON] || nr[LRU_ACTIVE_FILE] || nr[LRU_INACTIVE_FILE] cycle |
| 2504 | cond_resched() |
| 2506 | If nr_reclaimed < nr_to_reclaim || scan_adjusted Then Continue |
| 2516 | nr_file = nr[LRU_INACTIVE_FILE] + nr[LRU_ACTIVE_FILE] |
| 2517 | nr_anon = nr[LRU_INACTIVE_ANON] + nr[LRU_ACTIVE_ANON] |
| 2529 | scan_target = targets[LRU_INACTIVE_ANON] + targets[LRU_ACTIVE_ANON] + 1 |
| 2532 | percentage = nr_anon * 100 / scan_target |
| 2533 | Else |
| 2534 | scan_target = targets[LRU_INACTIVE_FILE] + targets[LRU_ACTIVE_FILE] + 1 |
| 2537 | percentage = nr_file * 100 / scan_target |
| 2542 | nr[lru + LRU_ACTIVE] = 0 |
| 2549 | nr_scanned = targets[lru] - nr[lru] |
| 2550 | nr[lru] = targets[lru] * (100 - percentage) / 100 |
| 2551 | nr[lru] -= min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(nr[lru], nr_scanned) |
| 2553 | lru += LRU_ACTIVE |
| 2554 | nr_scanned = targets[lru] - nr[lru] |
| 2555 | nr[lru] = targets[lru] * (100 - percentage) / 100 |
| 2556 | nr[lru] -= min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(nr[lru], nr_scanned) |
| 2558 | scan_adjusted = true |
| 2560 | blk_finish_plug( & plug) |
| Name | Describe |
|---|---|
| shrink_node_memcgs | |
| mem_cgroup_shrink_node | Only used by soft limit reclaim. Do not reuse for anything else. |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |