函数逻辑报告 |
Source Code:mm\swapfile.c |
Create Date:2022-07-27 16:49:01 |
Last Modify:2020-03-17 22:19:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:If the boolean frontswap is true, only unuse pages_to_unuse pages;* pages_to_unuse==0 means all pages; ignored if frontswap is false
函数原型:int try_to_unuse(unsigned int type, bool frontswap, unsigned long pages_to_unuse)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
unsigned int | type | |
bool | frontswap | |
unsigned long | pages_to_unuse |
2129 | retval等于0 |
2135 | 如果非umber of those currently in use 则返回:0 |
2138 | 如果非frontswap则pages_to_unuse等于0 |
2141 | retry : |
2142 | retval等于shmem_unuse(type, frontswap, & pages_to_unuse) |
2146 | prev_mm等于For dynamically allocated mm_structs, there is a dynamically sized cpumask* at the end of the structure, the size of which depends on the maximum CPU* number the system can see |
2149 | 加自旋锁 |
2150 | p等于 List of maybe swapped mm's. These * are globally strung together off * init_mm.mmlist, and are protected * by mmlist_lock |
2156 | 如果非mmget_not_zero(mm)则继续下一循环 |
2158 | 自旋锁解锁 |
2163 | 如果retval则 |
2172 | cond_resched() |
2173 | 加自旋锁 |
2175 | 自旋锁解锁 |
2179 | i等于0 |
2186 | 如果非page则继续下一循环 |
2206 | 如果pages_to_unuse且pages_to_unuse先自减恒等于0则转到:out |
2222 | 如果umber of those currently in use 则 |
2223 | 如果非signal_pending(当前进程)则转到:retry |
2227 | out : |
2228 | 返回:如果retval恒等于Return code to denote that requested number of* frontswap pages are unused(moved to page cache).* Used in in shmem_unuse and try_to_unuse.则0否则retval |
名称 | 描述 |
---|---|
SYSCALL_DEFINE1 | |
frontswap_shrink | Frontswap, like a true swap device, may unnecessarily retain pages* under certain circumstances; "shrink" frontswap is essentially a* "partial swapoff" and works by calling try_to_unuse to attempt to* unuse enough frontswap pages to attempt to -- subject |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |