函数逻辑报告 |
Source Code:mm\memcontrol.c |
Create Date:2022-07-27 17:48:22 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:memory_max_write
函数原型:static ssize_t memory_max_write(struct kernfs_open_file *of, char *buf, size_t nbytes, loff_t off)
返回类型:ssize_t
参数:
类型 | 参数 | 名称 |
---|---|---|
struct kernfs_open_file * | of | |
char * | buf | |
size_t | nbytes | |
loff_t | off |
5986 | memcg等于mem_cgroup_from_css(of_css(of)) |
5988 | bool drained = false |
5999 | 循环 |
6000 | nr_pages等于page_counter_read( & Accounted resources ) |
6005 | 如果signal_pending(当前进程)则退出 |
6008 | 如果非drained则 |
6009 | Drains all per-CPU charge caches for given root_memcg resp. subtree* of the hierarchy under it. |
6010 | drained = true |
6011 | 继续下一循环 |
6014 | 如果nr_reclaims则 |
6015 | 如果非try_to_free_mem_cgroup_pages(memcg, nr_pages - max, GFP_KERNEL, true)则nr_reclaims自减 |
6018 | 继续下一循环 |
6021 | memcg_memory_event(memcg, MEMCG_OOM) |
6022 | 如果非mem_cgroup_out_of_memory(memcg, GFP_KERNEL, 0)则退出 |
6027 | 返回:nbytes |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |