函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\rmap.c Create Date:2022-07-27 16:26:28
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:@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 longaddress
void *arg
1369  mm等于The address space we belong to.
1370  struct page_vma_mapped_walk pvmw = {page = page, vma = vma, address = address, }
1377  bool ret = true
1379  flags等于arg
1382  如果flags按位与 munlock mode 且非Flags, see mm.h. 按位与VM_LOCKED的值则返回:true
1385  如果IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_MIGRATION)且flags按位与 migration mode is_zone_device_page(page)且非is_device_private_page(page)则返回:true
1389  如果flags按位与 split huge PMD if any
1390  split_huge_pmd_address(vma, address, flags & freeze pte under splitting thp , page)
1402  mmu_notifier_range_init( & range, MMU_NOTIFY_CLEAR, 0, vma, The address space we belong to. , address, 两数取小(The first byte after our end addresswithin vm_mm. , address + Returns the number of bytes in this potentially compound page. ))
1405  如果PageHuge(page)则
1410  adjust_range_if_pmd_sharing_possible(vma, & start, & end)
1413  mmu_notifier_invalidate_range_start( & range)
1415 page_vma_mapped_walk - check if @pvmw->page is mapped in @pvmw->vma at*@pvmw->address*@pvmw: pointer to struct page_vma_mapped_walk. page, vma, address and flags* must be set. pmd, pte and ptl must be NULL.* Returns true if the page is mapped in the vma循环
1431  如果非flags按位与 ignore mlock 的值则
1432  如果Flags, see mm.h. 按位与VM_LOCKED
1445  如果flags按位与 munlock mode 则继续下一循环
1450  VM_BUG_ON_PAGE(!pte, page)
1452  subpage等于pagepage_to_pfn(page)加pte_pfn( * pte)
1453  address等于address
1455  如果PageHuge(page)则
1456  如果huge_pmd_unshare(mm, & address, pte)则
1496  entry等于make_migration_entry(page, 0)
1512  subpage等于page
1513  转到:discard
1516  如果非flags按位与 don't age 的值则
1519  ret = false
1521  退出
1526  flush_cache_page(vma, address, pte_pfn( * pte))
1527  如果should_defer_flush(mm, flags)则
1539  否则
1544  如果The following only work if pte_present() is true.* Undefined behaviour if not..Dirty a page
1548  update_hiwater_rss(mm)
1550  如果PageHWPoison(page)且非flags按位与 corrupted page is recoverable 的值则
1552  如果PageHuge(page)则
1557  否则
1584  ret = false
1586  退出
1604  否则如果PageAnon(page)则
1622  如果非PageSwapBacked(page)则
1623  如果非PageDirty(page)则
1637  ret = false
1639  退出
1642  如果swap_duplicate(entry)小于0则
1644  ret = false
1646  退出
1650  ret = false
1652  退出
1654  如果链表为空
1669  否则
1682  discard :
1690  page_remove_rmap - take down pte mapping from a page*@page: page to remove mapping from*@compound: uncharge the page as compound or small page* The caller needs to hold the pte lock.
1691  put_page(page)
1694  mmu_notifier_invalidate_range_end( & range)
1696  返回:ret