Function report |
Source Code:mm\memcontrol.c |
Create Date:2022-07-28 16:13:51 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:memory_max_write
Proto:static ssize_t memory_max_write(struct kernfs_open_file *of, char *buf, size_t nbytes, loff_t off)
Type:ssize_t
Parameter:
Type | Parameter | Name |
---|---|---|
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 | cycle |
6000 | nr_pages = page_counter_read( & Accounted resources ) |
6005 | If signal_pending(current process) Then Break |
6008 | If Not drained Then |
6009 | Drains all per-CPU charge caches for given root_memcg resp. subtree* of the hierarchy under it. |
6010 | drained = true |
6011 | Continue |
6014 | If nr_reclaims Then |
6015 | If Not try_to_free_mem_cgroup_pages(memcg, nr_pages - max, GFP_KERNEL, true) Then nr_reclaims-- |
6018 | Continue |
6021 | memcg_memory_event(memcg, MEMCG_OOM) |
6022 | If Not mem_cgroup_out_of_memory(memcg, GFP_KERNEL, 0) Then Break |
6027 | Return nbytes |
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 |