函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Getting a lock on a stable anon_vma from a page off the LRU is tricky!* Since there is no serialization what so ever against page_remove_rmap()* the best this function can do is return a locked anon_vma that might* have been relevant to this page

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

返回类型:struct anon_vma

参数:

类型参数名称
struct page *page
487  struct anon_vma * anon_vma = NULL
490  _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
491  anon_mapping等于READ_ONCE( See page-flags.h for PAGE_MAPPING_FLAGS )
492  如果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
494  如果非Return true if this page is mapped into pagetables.* For compound page it returns true if any subpage of compound page is mapped.则转到:out
497  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
498  如果非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.
499  anon_vma = NULL
500  转到:out
510  如果非Return true if this page is mapped into pagetables.* For compound page it returns true if any subpage of compound page is mapped.
511  _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()
512  put_anon_vma(anon_vma)
513  返回:NULL
515  out :
516  _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()
518  返回:anon_vma
调用者
名称描述
__unmap_and_move
unmap_and_move_huge_pageCounterpart of unmap_and_move_page() for hugepage migration
split_huge_page_to_listThis function splits huge page into normal pages. @page can point to any* subpage of huge page to split. Split doesn't change the position of @page.* Only caller must hold pin on the @page, otherwise split fails with -EBUSY.* The huge page must be locked.