函数逻辑报告 |
Source Code:mm\madvise.c |
Create Date:2022-07-27 16:42:31 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:madvise_cold_or_pageout_pte_range
函数原型:static int madvise_cold_or_pageout_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end, struct mm_walk *walk)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
pmd_t * | pmd | |
unsigned long | addr | |
unsigned long | end | |
struct mm_walk * | walk |
314 | 如果fatal_signal_pending(当前进程)则返回:负EINTR |
318 | 如果pmd_trans_huge( * pmd)则 |
320 | next等于pmd_addr_end(addr, end) |
324 | 如果非ptl则返回:0 |
328 | 如果is_huge_zero_pmd(orig_pmd)则转到:huge_unlock |
331 | 如果此条件成立可能性小(为编译器优化)(!pmd_present(orig_pmd))则 |
334 | 转到:huge_unlock |
337 | page等于Currently stuck as a macro due to indirect forward reference to* linux/mmzone.h's __section_mem_map_addr() definition:(orig_pmd) |
338 | 如果next减addr不等于HPAGE_PMD_SIZE则 |
341 | 如果page_mapcount(page)不等于1则转到:huge_unlock |
345 | 自旋锁解锁 |
347 | err等于split_huge_page(page) |
350 | 如果非err则转到:regular_page |
352 | 返回:0 |
356 | pmdp_invalidate(vma, addr, pmd) |
359 | set_pmd_at(mm, addr, pmd, orig_pmd) |
360 | tlb_remove_pmd_tlb_entry(tlb, pmd, addr) |
363 | ClearPageReferenced(page) |
365 | 如果pageout则 |
374 | huge_unlock : |
375 | 自旋锁解锁 |
376 | 如果pageout则reclaim_pages( & page_list) |
378 | 返回:0 |
383 | regular_page : |
385 | tlb_change_page_size(tlb, PAGE_SIZE) |
386 | orig_pte等于pte等于pte_offset_map_lock(The address space we belong to. , pmd, addr, & ptl) |
395 | 如果非pte_present(ptent)则继续下一循环 |
399 | 如果非page则继续下一循环 |
407 | 如果page_mapcount(page)不等于1则退出 |
414 | pte_unmap_unlock(orig_pte, ptl) |
415 | 如果split_huge_page(page)则 |
424 | pte自减 |
426 | 继续下一循环 |
429 | VM_BUG_ON_PAGE(PageTransCompound returns true for both transparent huge pages* and hugetlbfs pages, so it should only be called when it's known* that hugetlbfs pages aren't involved., page) |
432 | ptent等于ptep_get_and_clear_full(mm, addr, pte, we are in the middle of an operation to clear* a full mm and can make some optimizations) |
435 | set_pte_at(mm, addr, pte, ptent) |
445 | ClearPageReferenced(page) |
447 | 如果pageout则 |
458 | arch_leave_lazy_mmu_mode() |
459 | pte_unmap_unlock(orig_pte, ptl) |
460 | 如果pageout则reclaim_pages( & page_list) |
462 | cond_resched() |
464 | 返回:0 |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |