函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:page_idle_bitmap_read

函数原型:static ssize_t page_idle_bitmap_read(struct file *file, struct kobject *kobj, struct bin_attribute *attr, char *buf, loff_t pos, size_t count)

返回类型:ssize_t

参数:

类型参数名称
struct file *file
struct kobject *kobj
struct bin_attribute *attr
char *buf
loff_tpos
size_tcount
125  out等于buf
130  如果pos取模BITMAP_CHUNK_SIZEcount取模BITMAP_CHUNK_SIZE则返回:负EINVAL
133  pfn等于posBITS_PER_BYTE
134  如果pfn大于等于max_pfn则返回:0
137  end_pfn等于pfncountBITS_PER_BYTE
138  如果end_pfn大于max_pfnend_pfn等于max_pfn
141 pfn小于end_pfn循环
142  bit等于pfn取模BITMAP_CHUNK_BITS
143  如果非bitout等于0ULL
145  page等于Idle page tracking only considers user memory pages, for other types of* pages the idle flag is always unset and an attempt to set it is silently* ignored
146  如果page
147  如果page_is_idle(page)则
154  如果page_is_idle(page)则out或等于1ULL左移bit
159  如果bit恒等于BITMAP_CHUNK_BITS减1则out自加
161  cond_resched()
163  返回:outbuf