Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\swap.c Create Date:2022-07-28 14:13:19
Last Modify:2022-05-23 13:40:24 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:lru_cache_add_active_or_unevictable*@page: the page to be added to LRU*@vma: vma in which page is mapped for determining reclaimability* Place @page on the active or unevictable LRU list, depending on its* evictability

Proto:void lru_cache_add_active_or_unevictable(struct page *page, struct vm_area_struct *vma)

Type:void

Parameter:

TypeParameterName
struct page *page
struct vm_area_struct *vma
463  VM_BUG_ON_PAGE(PageLRU(page), page)
465  If Value is more likely to compile time((Flags, see mm.h. & (VM_LOCKED | Special vmas that are non-mergable, non-mlock()able.* Note: mm/huge_memory.c VM_NO_THP depends on this definition.)) != VM_LOCKED) Then SetPageActive(page)
467  Else if Not TestSetPageMlocked(page) Then
473  We do not maintain differentials in a single processor configuration.* The functions directly modify the zone and global counters.
475  Disable counters
477  lru_cache_add - add a page to a page list*@page: the page to be added to the LRU.* Queue the page for addition to the LRU via pagevec. The decision on whether* to add the page to the [in]active [file|anon] list is deferred until the* pagevec is drained
Caller
NameDescribe
wp_page_copyHandle the case of a page which we actually need to copy to a new page.* Called with mmap_sem locked and the old page referenced, but* without the ptl held.* High level logic flow:* - Allocate a page, copy the content of the old page to the new one.
do_swap_pageWe enter with non-exclusive mmap_sem (to exclude vma changes,* but allow concurrent faults), and pte mapped but not yet locked.* We return with pte unmapped and unlocked.* We return with the mmap_sem locked or unlocked in the same cases
do_anonymous_pageWe enter with non-exclusive mmap_sem (to exclude vma changes,* but allow concurrent faults), and pte mapped but not yet locked.* We return with mmap_sem still held, but pte unmapped and unlocked.
alloc_set_ptealloc_set_pte - setup new PTE entry for given page and add reverse page* mapping
unuse_pteNo need to decide whether this PTE shares the swap entry with others,* just let do_wp_page work it out if a write is requested later - to* force COW, vm_page_prot omits write permission from any private vma.
__do_huge_pmd_anonymous_page
do_huge_pmd_wp_page_fallback
do_huge_pmd_wp_page
collapse_huge_page
mcopy_atomic_pte