函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\mlock.c Create Date:2022-07-27 16:13:00
Last Modify:2022-05-23 14:12:58 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:munlock_vma_page - munlock a vma page*@page: page to be unlocked, either a normal page or THP page head* returns the size of the page as a page mask (0 for normal page,* HPAGE_PMD_NR - 1 for THP head page)

函数原型:unsigned int munlock_vma_page(struct page *page)

返回类型:unsigned int

参数:

类型参数名称
struct page *page
185  pgdat等于page_pgdat(page)
188  BUG_ON(!PageLocked(page))
190  VM_BUG_ON_PAGE(PageTail(page), page)
197  spin_lock_irq( & Write-intensive fields used by page reclaim )
199  如果非TestClearPageMlocked(page)则
201  nr_pages等于1
202  转到:unlock_out
205  nr_pages等于hpage_nr_pages(page)
206  We do not maintain differentials in a single processor configuration.* The functions directly modify the zone and global counters.
208  如果Isolate a page from LRU with optional get_page() pin.* Assumes lru_lock already held and page already pinned.
209  spin_unlock_irq( & Write-intensive fields used by page reclaim )
210  Finish munlock after successful page isolation* Page must be locked. This is a wrapper for try_to_munlock()* and putback_lru_page() with munlock accounting.
211  转到:out
213  Accounting for page isolation fail during munlock* Performs accounting when page isolation fails in munlock. There is nothing* else to do because it means some other task has already removed the page* from the LRU
215  unlock_out :
216  spin_unlock_irq( & Write-intensive fields used by page reclaim )
218  out :
219  返回:nr_pages减1
调用者
名称描述
munlock_vma_pages_rangemunlock_vma_pages_range() - munlock all pages in the vma range.'*@vma - vma containing range to be munlock()ed.*@start - start address in @vma of the range*@end - end of range in @vma.* For mremap(), munmap() and exit().* Called with @vma VM_LOCKED.
try_to_merge_one_pagery_to_merge_one_page - take two pages and merge them into one*@vma: the vma that holds the pte pointing to page*@page: the PageAnon page that we want to replace with kpage*@kpage: the PageKsm page that we want to map instead of page,
__replace_page__replace_page - replace page in vma by new page
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.