函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\page_alloc.c Create Date:2022-07-27 16:38:59
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Set PG_hwpoison flag if a given page is confirmed to be a free page. This* test is performed under the zone lock to prevent a race against page* allocation.

函数原型:bool set_hwpoison_free_buddy_page(struct page *page)

返回类型:bool

参数:

类型参数名称
struct page *page
8728  zone等于page_zone(page)
8729  pfn等于page_to_pfn(page)
8732  bool hwpoisoned = false
8734  spin_lock_irqsave( & 自旋锁, flags)
8735 order小于Free memory management - zoned buddy allocator. 循环
8736  page_head等于pagepfn按位与1左移order位的值减1的值
8739  如果非TestSetPageHWPoison(page)则hwpoisoned = true
8741  退出
8744  spin_unlock_irqrestore( & 自旋锁, flags)
8746  返回:hwpoisoned
调用者
名称描述
unmap_and_moveObtain the lock on page, remove all ptes and migrate the page* to the newly allocated page in newpage.
soft_offline_huge_page
soft_offline_free_page