函数逻辑报告 |
Source Code:mm\rmap.c |
Create Date:2022-07-27 16:26:28 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:@arg: enum ttu_flags will be passed to this argument
函数原型:static bool try_to_unmap_one(struct page *page, struct vm_area_struct *vma, unsigned long address, void *arg)
返回类型:bool
参数:
类型 | 参数 | 名称 |
---|---|---|
struct page * | page | |
struct vm_area_struct * | vma | |
unsigned long | address | |
void * | arg |
1377 | bool ret = true |
1382 | 如果flags按位与 munlock mode 且非Flags, see mm.h. 按位与VM_LOCKED的值则返回:true |
1389 | 如果flags按位与 split huge PMD if any 则 |
1410 | adjust_range_if_pmd_sharing_possible(vma, & start, & end) |
1413 | mmu_notifier_invalidate_range_start( & range) |
1431 | 如果非flags按位与 ignore mlock 的值则 |
1432 | 如果Flags, see mm.h. 按位与VM_LOCKED则 |
1445 | 如果flags按位与 munlock mode 则继续下一循环 |
1450 | VM_BUG_ON_PAGE(!pte, page) |
1456 | 如果huge_pmd_unshare(mm, & address, pte)则 |
1464 | flush_cache_range(vma, start, end) |
1465 | flush_tlb_range(vma, start, end) |
1466 | mmu_notifier_invalidate_range(mm, start, end) |
1478 | page_vma_mapped_walk_done( & pvmw) |
1479 | 退出 |
1489 | pteval等于ptep_get_and_clear(mm, address, pte) |
1496 | entry等于make_migration_entry(page, 0) |
1497 | swp_pte等于Convert the arch-independent representation of a swp_entry_t into the* arch-dependent pte representation. |
1498 | 如果pte_soft_dirty(pteval)则swp_pte等于pte_swp_mksoft_dirty(swp_pte) |
1500 | set_pte_at(mm, address, pte, swp_pte) |
1513 | 转到:discard |
1517 | 如果ptep_clear_flush_young_notify(vma, address, pte)则 |
1526 | flush_cache_page(vma, address, pte_pfn( * pte)) |
1527 | 如果should_defer_flush(mm, flags)则 |
1536 | pteval等于ptep_get_and_clear(mm, address, pte) |
1539 | 否则 |
1540 | pteval等于ptep_clear_flush(vma, address, pte) |
1548 | update_hiwater_rss(mm) |
1550 | 如果PageHWPoison(page)且非flags按位与 corrupted page is recoverable 的值则 |
1551 | pteval等于Convert the arch-independent representation of a swp_entry_t into the* arch-dependent pte representation. |
1554 | set_huge_swap_pte_at(mm, address, pte, pteval, vma_mmu_pagesize(vma)) |
1557 | 否则 |
1558 | dec_mm_counter(mm, mm_counter(page)) |
1559 | set_pte_at(mm, address, pte, pteval) |
1573 | dec_mm_counter(mm, mm_counter(page)) |
1575 | mmu_notifier_invalidate_range(mm, address, address + PAGE_SIZE) |
1583 | set_pte_at(mm, address, pte, pteval) |
1584 | ret = false |
1585 | page_vma_mapped_walk_done( & pvmw) |
1586 | 退出 |
1594 | entry等于make_migration_entry(subpage, pte_write(pteval)) |
1596 | swp_pte等于Convert the arch-independent representation of a swp_entry_t into the* arch-dependent pte representation. |
1597 | 如果pte_soft_dirty(pteval)则swp_pte等于pte_swp_mksoft_dirty(swp_pte) |
1599 | set_pte_at(mm, address, pte, swp_pte) |
1605 | swp_entry_t entry = {val = page_private(subpage)} |
1611 | 如果此条件成立可能性小(为编译器优化)(PageSwapBacked(page) != PageSwapCache(page))则 |
1612 | WARN_ON_ONCE(1) |
1613 | ret = false |
1615 | mmu_notifier_invalidate_range(mm, address, address + PAGE_SIZE) |
1617 | page_vma_mapped_walk_done( & pvmw) |
1618 | 退出 |
1622 | 如果非PageSwapBacked(page)则 |
1625 | mmu_notifier_invalidate_range(mm, address, address + PAGE_SIZE) |
1627 | dec_mm_counter(mm, MM_ANONPAGES) |
1628 | 转到:discard |
1635 | set_pte_at(mm, address, pte, pteval) |
1636 | SetPageSwapBacked(page) |
1637 | ret = false |
1638 | page_vma_mapped_walk_done( & pvmw) |
1639 | 退出 |
1642 | 如果swap_duplicate(entry)小于0则 |
1643 | set_pte_at(mm, address, pte, pteval) |
1644 | ret = false |
1645 | page_vma_mapped_walk_done( & pvmw) |
1646 | 退出 |
1649 | set_pte_at(mm, address, pte, pteval) |
1650 | ret = false |
1651 | page_vma_mapped_walk_done( & pvmw) |
1652 | 退出 |
1654 | 如果链表为空则 |
1660 | dec_mm_counter(mm, MM_ANONPAGES) |
1661 | inc_mm_counter(mm, MM_SWAPENTS) |
1662 | swp_pte等于Convert the arch-independent representation of a swp_entry_t into the* arch-dependent pte representation. |
1663 | 如果pte_soft_dirty(pteval)则swp_pte等于pte_swp_mksoft_dirty(swp_pte) |
1665 | set_pte_at(mm, address, pte, swp_pte) |
1667 | mmu_notifier_invalidate_range(mm, address, address + PAGE_SIZE) |
1669 | 否则 |
1682 | discard : |
1694 | mmu_notifier_invalidate_range_end( & range) |
1696 | 返回:ret |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |