函数逻辑报告 |
Source Code:mm\madvise.c |
Create Date:2022-07-27 16:42:47 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:madvise_free_pte_range
函数原型:static int madvise_free_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 |
566 | nr_swap等于0 |
569 | next等于pmd_addr_end(addr, end) |
570 | 如果pmd_trans_huge( * pmd)则如果Return true if we do MADV_FREE successfully on entire pmd page.* Otherwise, return false.则 |
572 | 转到:next |
577 | tlb_change_page_size(tlb, PAGE_SIZE) |
591 | 如果非pte_present(ptent)则 |
594 | entry等于Convert the arch-dependent pte representation of a swp_entry_t into an* arch-independent swp_entry_t. |
595 | 如果non_swap_entry(entry)则继续下一循环 |
597 | nr_swap自减 |
598 | free_swap_and_cache(entry) |
600 | 继续下一循环 |
604 | 如果非page则继续下一循环 |
613 | 如果page_mapcount(page)不等于1则转到:out |
620 | pte_unmap_unlock(orig_pte, ptl) |
621 | 如果split_huge_page(page)则 |
630 | pte自减 |
632 | 继续下一循环 |
635 | 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) |
637 | 如果PageSwapCache(page)或PageDirty(page)则 |
638 | 如果非Return true if the page was successfully locked则继续下一循环 |
644 | 如果page_mapcount(page)不等于1则 |
649 | 如果PageSwapCache(page)且非try_to_free_swap(page)则 |
654 | ClearPageDirty(page) |
675 | out : |
676 | 如果nr_swap则 |
677 | 如果mm恒等于mm则sync_mm_rss(mm) |
680 | add_mm_counter(mm, MM_SWAPENTS, nr_swap) |
682 | arch_leave_lazy_mmu_mode() |
683 | pte_unmap_unlock(orig_pte, ptl) |
684 | cond_resched() |
685 | next : |
686 | 返回:0 |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |