Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\mlock.c Create Date:2022-07-28 14:45:30
Last Modify:2022-05-23 14:12:58 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Munlock a batch of pages from the same zone* The work is split to two main phases

Proto:static void __munlock_pagevec(struct pagevec *pvec, struct zone *zone)

Type:void

Parameter:

TypeParameterName
struct pagevec *pvec
struct zone *zone
293  nr = pagevec_count(pvec)
294  delta_munlocked = -nr
296  pgrescued = 0
298  pagevec_init( & pvec_putback)
301  spin_lock_irq( & Write-intensive fields used by page reclaim )
302  When i < nr cycle
303  page = pages[i]
305  If TestClearPageMlocked(page) Then
314  Else
315  delta_munlocked++
324  Add a page to a pagevec. Returns the number of slots still available.
325  pages[i] = NULL
327  We do not maintain differentials in a single processor configuration.* The functions directly modify the zone and global counters.
328  spin_unlock_irq( & Write-intensive fields used by page reclaim )
331  pagevec_release( & pvec_putback)
334  When i < nr cycle
335  page = pages[i]
337  If page Then
357  If pagevec_count( & pvec_putback) Then Putback multiple evictable pages to the LRU* Batched putback of evictable pages that bypasses the per-cpu pvec. Some of* the pages might have meanwhile become unevictable but that is OK.
Caller
NameDescribe
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.