Changeset 635 for trunk/kernel/mm/mapper.h
- Timestamp:
- Jun 26, 2019, 11:42:37 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/mm/mapper.h
r628 r635 64 64 * TODO (1) the mapper being only used to implement the VFS cache(s), the mapper.c 65 65 * and mapper.h file should be trandfered to the fs directory. 66 * TODO (2) the "type" field i s probably unused...66 * TODO (2) the "type" field in mapper descriptor is redundant and probably unused. 67 67 ******************************************************************************************/ 68 68 … … 106 106 107 107 /******************************************************************************************* 108 * This function load from device a missing page identified by the <page_id> argument109 * into the mapper identified by the <mapper> local pointer.110 * It allocates a physical page from the local cluster, initialise by accessing device,111 * and register the page in the mapper radix tree.112 * It must be executed by a thread running in the cluster containing the mapper.108 * This function load from the IOC device a missing page identified by the <page_id> 109 * argument into a - possibly remote - mapper identified by the <mapper_xp> argument. 110 * It can be executed by a thread running in any cluster. 111 * It allocates a physical page from the remote cluster PPM, initialises it by accessing 112 * the IOC device, and registers the page in the remote mapper radix tree. 113 113 * WARNING : the calling function mapper_remote_get_page() is supposed to take and release 114 114 * the lock protecting the mapper in WRITE_MODE. 115 115 ******************************************************************************************* 116 * @ mapper : [in] target mapper. 117 * @ page_id : [in] missing page index in file. 118 * @ page_xp : [out] buffer for extended pointer on missing page descriptor. 119 * @ return 0 if success / return -1 if a dirty page cannot be updated on device. 120 ******************************************************************************************/ 121 error_t mapper_handle_miss( mapper_t * mapper, 122 uint32_t page_id, 123 xptr_t * page_xp ); 116 * @ mapper_xp : [in] extended pointer on remote mapper. 117 * @ page_id : [in] missing page index in file. 118 * @ page_xp : [out] buffer for extended pointer on missing page descriptor. 119 * @ return 0 if success / return -1 if IOC cannot be accessed. 120 ******************************************************************************************/ 121 error_t mapper_remote_handle_miss( xptr_t mapper_xp, 122 uint32_t page_id, 123 xptr_t * page_xp ); 124 125 /******************************************************************************************* 126 * This function removes a physical page from a - possibly remote - mapper, 127 * and releases the page to the remote PPM. 128 * It can be executed by any thread running in any cluster. 129 * It takes the mapper lock in WRITE_MODE to update the mapper. 130 ******************************************************************************************* 131 * @ mapper : extended pointer on the remote mapper. 132 * @ page : local pointer on the page in remote mapper. 133 ******************************************************************************************/ 134 void mapper_remote_release_page( xptr_t mapper_xp, 135 struct page_s * page ); 124 136 125 137 /******************************************************************************************* … … 170 182 171 183 /******************************************************************************************* 172 * This function removes a physical page from the mapper, and releases173 * the page to the local PPM. It is called by the mapper_destroy() function.174 * It must be executed by a thread running in the cluster containing the mapper.175 * It takes the mapper lock in WRITE_MODE to update the mapper.176 *******************************************************************************************177 * @ mapper : local pointer on the mapper.178 * @ page : pointer on page to remove.179 ******************************************************************************************/180 void mapper_release_page( mapper_t * mapper,181 struct page_s * page );182 183 /*******************************************************************************************184 184 * This function returns an extended pointer on a page descriptor. 185 185 * The - possibly remote - mapper is identified by the <mapper_xp> argument. … … 237 237 /******************************************************************************************* 238 238 * This function scan all pages present in the mapper identified by the <mapper> argument, 239 * and synchronize all pages ma ked asdirty" on disk.239 * and synchronize all pages marked as "dirty" on disk. 240 240 * These pages are unmarked and removed from the local PPM dirty_list. 241 241 * This function must be called by a local thread running in same cluster as the mapper.
Note: See TracChangeset
for help on using the changeset viewer.