函数逻辑报告 |
Source Code:mm\vmscan.c |
Create Date:2022-07-27 15:41:18 |
Last Modify:2022-05-23 13:41:30 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:shrink_slab_memcg
函数原型:static unsigned long shrink_slab_memcg(gfp_t gfp_mask, int nid, struct mem_cgroup *memcg, int priority)
返回类型:unsigned long
参数:
类型 | 参数 | 名称 |
---|---|---|
gfp_t | gfp_mask | |
int | nid | |
struct mem_cgroup * | memcg | |
int | priority |
562 | freed等于0 |
565 | 如果非mem_cgroup_online(memcg)则返回:0 |
573 | 如果此条件成立可能性小(为编译器优化)(!map)则转到:unlock |
577 | struct shrink_control sc = {gfp_mask = gfp_mask, current node being shrunk (for NUMA aware shrinkers) = nid, current memcg being shrunk (for memcg aware shrinkers) = memcg, } |
586 | 如果非shrinker则lear_bit - Clears a bit in memory*@nr: Bit to clear*@addr: Address to start counting from* This is a relaxed atomic operation (no implied memory barriers). |
588 | 继续下一循环 |
592 | 如果非memcg_kmem_enabled()且非flags按位与It just makes sense when the shrinker is also MEMCG_AWARE for now,* non-MEMCG_AWARE shrinker should not have this flag set.的值则继续下一循环 |
596 | ret等于do_shrink_slab( & sc, shrinker, priority) |
597 | 如果ret恒等于SHRINK_EMPTY则 |
614 | smp_mb__after_atomic() |
615 | ret等于do_shrink_slab( & sc, shrinker, priority) |
616 | 如果ret恒等于SHRINK_EMPTY则ret等于0 |
618 | 否则memcg_set_shrinker_bit(memcg, nid, i) |
628 | unlock : |
630 | 返回:freed |
名称 | 描述 |
---|---|
shrink_slab | shrink_slab - shrink slab caches*@gfp_mask: allocation context*@nid: node whose slab caches to target*@memcg: memory cgroup whose slab caches to target*@priority: the reclaim priority* Call the shrink functions to age shrinkable caches |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |