Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\memory-failure.c Create Date:2022-07-28 16:18:37
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Collect processes when the error hit an anonymous page.

Proto:static void collect_procs_anon(struct page *page, struct list_head *to_kill, int force_early)

Type:void

Parameter:

TypeParameterName
struct page *page
struct list_head *to_kill
intforce_early
441  av = 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
442  If (av == NULL) Then Return
445  pgoff = Get the offset in PAGE_SIZE.* (TODO: hugepage should have ->index in PAGE_SIZE)
446  read_lock( & tasklist_lock)
449  t = Determine whether a given process is "early kill" process which expects* to be signaled when some page under the process is hwpoisoned.* Return task_struct of the dedicated thread (main thread unless explicitly
451  If Not t Then Continue
455  vma = vma
456  If Not page_mapped_in_vma - check whether a page is really mapped in a VMA*@page: the page to test*@vma: the VMA to test* Returns 1 if the page is mapped into the page tables of the VMA, 0* if the page is not mapped into the page tables of this VMA. Only Then Continue
458  If The address space we belong to. == mm Then Schedule a process for later kill.* Uses GFP_ATOMIC allocations to avoid potential recursions in the VM.
462  read_unlock( & tasklist_lock)
463  page_unlock_anon_vma_read(av)
Caller
NameDescribe
collect_procsCollect the processes who have the corrupted page mapped to kill.