函数逻辑报告 |
Source Code:mm\ksm.c |
Create Date:2022-07-27 17:15:13 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:scan_get_next_rmap_item
函数原型:static struct rmap_item *scan_get_next_rmap_item(struct page **page)
返回类型:struct rmap_item
参数:
类型 | 参数 | 名称 |
---|---|---|
struct page ** | page |
2224 | 如果链表为空则返回:NULL |
2228 | 如果slot恒等于ksm_mm_head则 |
2239 | lru_add_drain_all() |
2255 | 如果page则Perform a free_page(), also freeing any swap cache associated with* this page if it is the last user of the page. |
2257 | cond_resched() |
2261 | 以nid小于ksm_nr_node_ids循环root_unstable_tree[nid] = |
2264 | 加自旋锁 |
2267 | 自旋锁解锁 |
2272 | 如果slot恒等于ksm_mm_head则返回:NULL |
2274 | next_mm : |
2275 | address等于0 |
2280 | lock for reading |
2287 | 如果非Flags, see mm.h. 按位与KSM may merge identical pages 的值则继续下一循环 |
2297 | page等于follow_page(vma, address, do get_page on page ) |
2298 | 如果是错误或空则 |
2304 | flush_anon_page(vma, * page, address) |
2305 | flush_dcache_page( * page) |
2306 | rmap_item等于get_next_rmap_item(slot, rmap_list, address) |
2308 | 如果rmap_item则 |
2314 | lease a read lock |
2315 | 返回:rmap_item |
2319 | cond_resched() |
2333 | 加自旋锁 |
2336 | 如果address恒等于0则 |
2354 | 否则 |
2355 | lease a read lock |
2363 | 自旋锁解锁 |
2368 | 如果slot不等于ksm_mm_head则转到:next_mm |
2371 | seqnr自加 |
2372 | 返回:NULL |
名称 | 描述 |
---|---|
ksm_do_scan | ksm_do_scan - the ksm scanner main worker function.*@scan_npages: number of pages we want to scan before we return. |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |