Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:page_idle_bitmap_write

Proto:static ssize_t page_idle_bitmap_write(struct file *file, struct kobject *kobj, struct bin_attribute *attr, char *buf, loff_t pos, size_t count)

Type:ssize_t

Parameter:

TypeParameterName
struct file *file
struct kobject *kobj
struct bin_attribute *attr
char *buf
loff_tpos
size_tcount
170  in = buf
175  If pos % BITMAP_CHUNK_SIZE || count % BITMAP_CHUNK_SIZE Then Return -EINVAL
178  pfn = pos * BITS_PER_BYTE
179  If pfn >= max_pfn Then Return -ENXIO
182  end_pfn = pfn + count * BITS_PER_BYTE
183  If end_pfn > max_pfn Then end_pfn = max_pfn
186  When pfn < end_pfn cycle
187  bit = pfn % BITMAP_CHUNK_BITS
188  If in >> bit & 1 Then
190  If page Then
196  If bit == BITMAP_CHUNK_BITS - 1 Then in++
198  cond_resched()
200  Return in - buf