Function report |
Source Code:mm\fadvise.c |
Create Date:2022-07-28 14:07:01 |
Last Modify:2020-03-17 21:10:40 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:POSIX_FADV_WILLNEED could set PG_Referenced, and POSIX_FADV_NOREUSE could* deactivate the pages and clear PG_Referenced.
Proto:int generic_fadvise(struct file *file, loff_t offset, loff_t len, int advice)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct file * | file | |
loff_t | offset | |
loff_t | len | |
int | advice |
40 | inode = file_inode(file) |
48 | bdi = inode_to_bdi(host) |
50 | If IS_DAX(inode) || bdi == noop_backing_dev_info Then |
52 | Case advice == No further special treatment. |
53 | Case advice == Expect random page references. |
54 | Case advice == Expect sequential page references. |
55 | Case advice == Will need these pages. |
56 | Case advice == Data will be accessed once. |
57 | Case advice == Don't need these pages. |
59 | Break |
60 | Default |
61 | Return -EINVAL |
63 | Return 0 |
74 | Else endbyte-- |
78 | Case advice == No further special treatment. |
83 | Break |
84 | Case advice == Expect random page references. |
88 | Break |
89 | Case advice == Expect sequential page references. |
94 | Break |
95 | Case advice == Will need these pages. |
101 | nrpages = end_index - start_index + 1 |
110 | Break |
111 | Case advice == Data will be accessed once. |
112 | Break |
113 | Case advice == Don't need these pages. |
123 | start_index = offset + PAGE_SIZE - 1 >> PAGE_SHIFT determines the page size |
145 | If end_index >= start_index Then |
157 | lru_add_drain() |
168 | If count < end_index - start_index + 1 Then |
174 | Break |
175 | Default |
176 | Return -EINVAL |
178 | Return 0 |
Name | Describe |
---|---|
vfs_fadvise |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |