Changeset 238 for trunk/kernel/mm
- Timestamp:
- Jul 19, 2017, 3:31:39 PM (7 years ago)
- Location:
- trunk/kernel/mm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/mm/mapper.c
r204 r238 164 164 page = grdxt_lookup( &mapper->radix , index ); 165 165 166 if ( page == NULL ) // missing page => load it from file system166 if ( page == NULL ) // missing page => create it and load it from file system 167 167 { 168 168 mapper_dmsg("\n[INFO] %s : missing page => load from FS\n", __FUNCTION__ ); … … 208 208 } 209 209 210 // update the mapper and index fields in page descriptor 211 // required by the vfs_move_page_to_mapper() 212 page->mapper = mapper; 213 page->index = index; 214 210 215 // launch I/O operation to load page from file system 211 error = vfs_m ove_page_to_mapper( page );216 error = vfs_mapper_move_page( page , true ); // to mapper 212 217 213 218 if( error ) … … 223 228 } 224 229 225 // update the mapper and index fields in page descriptor226 page->mapper = mapper;227 page->index = index;228 229 230 // reset the page INLOAD flag to make the page available to all readers 230 231 page_clear_flag( page , PG_INLOAD ); … … 267 268 268 269 // lauch IO operation to update page to file system 269 error = vfs_m ove_page_from_mapper( page );270 error = vfs_mapper_move_page( page , false ); // from mapper 270 271 271 272 if( error ) -
trunk/kernel/mm/mapper.h
r204 r238 49 49 * - The mapper is protected by a blocking "rwlock", to support several simultaneous 50 50 * readers, and only one writer. This lock implement a busy waiting policy. 51 * - The two functions vfs_move_page_to_mapper() and vfs_move_page_from_mapper() define52 * the generic API used to move pages to or from the relevant file system.53 * - the mapper_move() function is used to move data to or from a , possibly distributed54 * user buffer in user space.51 * - The vfs_mapper_move_page() and vfs_mapper_load_all() functions are used to move 52 * pages to or from the file system on device. 53 * - the mapper_move() function is used to move data to or from an user buffer. 54 * This user space buffer can be physically distributed in several clusters. 55 55 * - The mapper_get_page() function that return a page descriptor pointer from a page 56 56 * index in file is in charge of handling the miss on the mapper cache. -
trunk/kernel/mm/page.c
r149 r238 147 147 148 148 // sync the page 149 vfs_m ove_page_from_mapper( page );149 vfs_mapper_move_page( page , false ); // from mapper 150 150 151 151 // unlock the page
Note: See TracChangeset
for help on using the changeset viewer.