函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Similar to page_get_anon_vma() except it locks the anon_vma.* Its a little more complex as it tries to keep the fast path to a single* atomic op -- the trylock. If we fail the trylock, we fall back to getting a

函数原型:struct anon_vma *page_lock_anon_vma_read(struct page *page)

返回类型:struct anon_vma

参数:

类型参数名称
struct page *page
530  struct anon_vma * anon_vma = NULL
534  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
535  anon_mapping等于READ_ONCE( See page-flags.h for PAGE_MAPPING_FLAGS )
536  如果anon_mapping按位与PAGE_MAPPING_FLAGS的值不等于On an anonymous page mapped into a user virtual memory area,* page->mapping points to its anon_vma, not to a struct address_space;* with the PAGE_MAPPING_ANON bit set to distinguish it则转到:out
538  如果非Return true if this page is mapped into pagetables.* For compound page it returns true if any subpage of compound page is mapped.则转到:out
541  anon_vmaanon_vma等于anon_mappingOn an anonymous page mapped into a user virtual memory area,* page->mapping points to its anon_vma, not to a struct address_space;* with the PAGE_MAPPING_ANON bit set to distinguish it
542  root_anon_vma等于READ_ONCE(Root of this anon_vma tree )
543  如果rylock for reading -- returns 1 if successful, 0 if contention
551  anon_vma = NULL
553  转到:out
557  如果非atomic_inc_not_zero - increment unless the number is zero*@v: pointer of type atomic_t* Atomically increments @v by 1, if @v is non-zero.* Returns true if the increment was done.
558  anon_vma = NULL
559  转到:out
562  如果非Return true if this page is mapped into pagetables.* For compound page it returns true if any subpage of compound page is mapped.
563  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
564  put_anon_vma(anon_vma)
565  返回:NULL
569  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
570  anon_vma_lock_read(anon_vma)
572  如果atomic_dec_and_test( & The refcount is taken on an anon_vma when there is no* guarantee that the vma of page tables will exist for* the duration of the operation. A caller that takes* the reference is responsible for clearing up the* anon_vma if they are the last user on release)则
578  anon_vma_unlock_read(anon_vma)
579  __put_anon_vma(anon_vma)
580  anon_vma = NULL
583  返回:anon_vma
585  out :
586  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
587  返回:anon_vma
调用者
名称描述
do_huge_pmd_numa_pageNUMA hinting page fault entry point for trans huge pmds
collect_procs_anonCollect processes when the error hit an anonymous page.