函数逻辑报告 |
Source Code:mm\khugepaged.c |
Create Date:2022-07-27 17:41:26 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:khugepaged_scan_mm_slot
函数原型:static unsigned int khugepaged_scan_mm_slot(unsigned int pages, struct page **hpage)__releases(&khugepaged_mm_lock) __acquires(&khugepaged_mm_lock)
返回类型:unsigned int
参数:
类型 | 参数 | 名称 |
---|---|---|
unsigned int | pages | |
struct page ** | hpage |
1928 | progress等于0 |
1931 | lockdep_assert_held( & khugepaged_mm_lock) |
1935 | 否则 |
1938 | address等于0 |
1941 | 自旋锁解锁 |
1949 | vma = NULL |
1950 | 如果此条件成立可能性小(为编译器优化)(!rylock for reading -- returns 1 if successful, 0 if contention)则转到:breakouterloop_mmap_sem |
1952 | 如果此条件成立可能性大(为编译器优化)(!khugepaged_test_exit(mm))则vma等于Look up the first VMA which satisfies addr < vm_end, NULL if none. |
1955 | progress自加 |
1959 | cond_resched() |
1960 | 如果此条件成立可能性小(为编译器优化)(khugepaged_test_exit(mm))则 |
1964 | 如果非hugepage_vma_check(vma, Flags, see mm.h. )则 |
1977 | VM_BUG_ON(address & ~HPAGE_PMD_MASK) |
1981 | cond_resched() |
1982 | 如果此条件成立可能性小(为编译器优化)(khugepaged_test_exit(mm))则转到:breakouterloop |
1990 | pgoff等于linear_page_index(vma, address) |
1993 | 如果shmem_file(File we map to (can be NULL). )且非shmem_huge_enabled(vma)则转到:skip |
1997 | lease a read lock |
1998 | ret等于1 |
1999 | khugepaged_scan_file(mm, file, pgoff, hpage) |
2001 | 否则 |
2007 | address加等于HPAGE_PMD_SIZE |
2008 | progress加等于HPAGE_PMD_NR |
2009 | 如果ret则转到:breakouterloop_mmap_sem |
2012 | 如果progress大于等于pages则转到:breakouterloop |
2016 | breakouterloop : |
2017 | lease a read lock |
2018 | breakouterloop_mmap_sem : |
2020 | 加自旋锁 |
2026 | 如果khugepaged_test_exit(mm)或非vma则 |
2036 | address等于0 |
2037 | 否则 |
2038 | mm_slot = NULL |
2039 | khugepaged_full_scans自加 |
2042 | collect_mm_slot(mm_slot) |
2045 | 返回:progress |
名称 | 描述 |
---|---|
khugepaged_do_scan |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |