Function report |
Source Code:mm\readahead.c |
Create Date:2022-07-28 14:12:02 |
| Last Modify:2020-03-17 21:13:07 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Chunk the readahead into 2 megabyte units, so that we don't pin too much* memory at once.
Proto:int force_page_cache_readahead(struct address_space *mapping, struct file *filp, unsigned long offset, unsigned long nr_to_read)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct address_space * | mapping | |
| struct file * | filp | |
| unsigned long | offset | |
| unsigned long | nr_to_read |
| 225 | bdi = inode_to_bdi(host) |
| 229 | If Value for the false possibility is greater at compile time(!readpage && !readpages) Then Return -EINVAL |
| 236 | max_pages = max_t - return maximum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(unsignedlong, max allowed IO size , Maximum readahead window ) |
| 237 | nr_to_read = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(nr_to_read, max_pages) |
| 238 | When nr_to_read cycle |
| 239 | this_chunk = 2 * 1024 * 1024 / PAGE_SIZE |
| 241 | If this_chunk > nr_to_read Then this_chunk = nr_to_read |
| 245 | offset += this_chunk |
| 246 | nr_to_read -= this_chunk |
| 248 | Return 0 |
| Name | Describe |
|---|---|
| page_cache_sync_readahead | page_cache_sync_readahead - generic file readahead*@mapping: address_space which holds the pagecache and I/O vectors*@ra: file_ra_state which holds the readahead state*@filp: passed on to ->readpage() and ->readpages()*@offset: start offset into @mapping, |
| 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 |