Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Schedule a process for later kill.* Uses GFP_ATOMIC allocations to avoid potential recursions in the VM.

Proto:static void add_to_kill(struct task_struct *tsk, struct page *p, struct vm_area_struct *vma, struct list_head *to_kill)

Type:void

Parameter:

TypeParameterName
struct task_struct *tsk
struct page *p
struct vm_area_struct *vma
struct list_head *to_kill
313  tk = kmalloc( size of to_kill , DOC: Useful GFP flag combinations* Useful GFP flag combinations* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~* Useful GFP flag combinations that are commonly used. It is recommended* that subsystems start with one of these combinations and then set/clear)
314  If Not tk Then
315  pr_err("Memory failure: Out of memory while machine check handling\n")
316  Return
319  addr = At what user virtual address is page expected in vma?* Caller should check the page is actually part of the vma.
320  If is_zone_device_page(p) Then size_shift = dev_pagemap_mapping_shift(p, vma)
322  Else size_shift = Returns the number of bits needed for the number of bytes in a page
335  If addr == -EFAULT Then
336  pr_info("Memory failure: Unable to find user space address %lx in %s\n", page_to_pfn(p), comm)
338  Else if size_shift == 0 Then
339  kfree(tk)
340  Return
343  get_task_struct(tsk)
344  tsk = tsk
345  list_add_tail - add a new entry*@new: new entry to be added*@head: list head to add it before* Insert a new entry before the specified head.* This is useful for implementing queues.
Caller
NameDescribe
collect_procs_anonCollect processes when the error hit an anonymous page.
collect_procs_fileCollect processes when the error hit a file mapped page.