函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Process all subpages of the specified huge page with the specified* operation. The target subpage will be processed last to keep its* cache lines hot.

函数原型:static inline void process_huge_page(unsigned long addr_hint, unsigned int pages_per_huge_page, void (*process_subpage)(unsigned long addr, int idx, void *arg), void *arg)

返回类型:void

参数:

类型参数名称
unsigned longaddr_hint
unsigned intpages_per_huge_page
void (*process_subpage
void *arg
4633  addr等于addr_hint按位与pages_per_huge_page左移PAGE_SHIFT determines the page size 位的值减1的差的反
4637  might_sleep()
4638  n等于addr_hintaddr的差除PAGE_SIZE
4639  如果2乘n小于等于pages_per_huge_page
4641  base等于0
4642  l等于n
4644 i大于等于2乘n循环
4645  cond_resched()
4648  否则
4650  base等于pages_per_huge_page减2乘pages_per_huge_pagen的差
4651  l等于pages_per_huge_pagen
4653 i小于base循环
4654  cond_resched()
4662 i小于l循环
4663  left_idx等于basei
4664  right_idx等于base加2乘l减1减i
4666  cond_resched()
4667  process_subpage(addr + left_idx * PAGE_SIZE, left_idx, arg)
4668  cond_resched()
4669  process_subpage(addr + right_idx * PAGE_SIZE, right_idx, arg)
调用者
名称描述
clear_huge_page
copy_user_huge_page