Changeset 657 for trunk/kernel/mm/vmm.h
- Timestamp:
- Mar 18, 2020, 11:16:59 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/mm/vmm.h
r656 r657 3 3 * 4 4 * Authors Ghassan Almaless (2008,2009,2010,2011, 2012) 5 * Mohamed Lamine Karaoui (2015) 6 * Alain Greiner (2016,2017,2018,2019) 5 * Alain Greiner (2016,2017,2018,2019,2020)) 7 6 * 8 7 * Copyright (c) UPMC Sorbonne Universites … … 31 30 #include <list.h> 32 31 #include <queuelock.h> 32 #include <remote_queuelock.h> 33 33 #include <hal_gpt.h> 34 34 #include <vseg.h> … … 208 208 209 209 /********************************************************************************************* 210 * This function modifies the size of the vseg identified by <process> and <base> arguments 211 * in all clusters containing a VSL copy, as defined by <new_base> and <new_size> arguments. 212 * This function is called by the sys_munmap() function, and can be called by a thread 213 * running in any cluster, as it uses remote accesses. 210 * This function modifies the vseg identified by <process> and <base> arguments in all 211 * clusters containing a VSL copy, as defined by <new_base> and <new_size> arguments. 212 * The new vseg, defined by the <new_base> and <new_size> arguments must be included 213 * in the existing vseg. The target VSL size and base fields are modified in the VSL. 214 * This is done in all clusters containing a VMM copy to maintain VMM coherence. 215 * It is called by the sys_munmap() and dev_fbf_resize_window() functions. 216 * It can be called by a thread running in any cluster, as it uses the vmm_resize_vseg() in 217 * the local cluster, and parallel RPC_VMM_RESIZE_VSEG for remote clusters. 214 218 * It cannot fail, as only vseg registered in VSL copies are updated. 215 219 ********************************************************************************************* … … 228 232 * the VSL and remove all associated PTE entries from the GPT. 229 233 * This is done in all clusters containing a VMM copy to maintain VMM coherence. 230 * This function can be called by a thread running in any cluster, as it uses the 231 * vmm_remove_vseg() in the local cluster, and the RPC_VMM_REMOVE_VSEG for remote clusters. 234 * It is called by the sys_munmap() and dev_fbf_resize_window() functions. 235 * It can be called by a thread running in any cluster, as it uses the vmm_remove_vseg() in 236 * the local cluster, and parallel RPC_VMM_REMOVE_VSEG for remote clusters. 232 237 * It cannot fail, as only vseg registered in VSL copies are deleted. 233 238 ********************************************************************************************* … … 317 322 * It must be called by a local thread, running in the cluster containing the modified VMM. 318 323 * Use the RPC_VMM_REMOVE_VSEG if required. 319 * It makes a kernel panic if the process is not registered in the local cluster, 320 * or if the vseg is not registered in the process VSL. 324 * It makes a kernel panic if the process is not registered in the local cluster. 321 325 * For all vseg types, the vseg is detached from local VSL, and all associated PTEs are 322 326 * unmapped from local GPT. Other actions depend on the vseg type: … … 340 344 /********************************************************************************************* 341 345 * This function resize a local vseg identified by the <process> and <vseg> arguments. 342 * It is called by the vmm_global_resize() function. 343 * It must be called by a local thread, running in the cluster containing the modified VMM. 346 * Both the "size" and "base" fields are modified in the process VSL. When the new vseg 347 * contains less pages than the target vseg, the relevant pages are removed from the GPT. 348 * It is called by the vmm_global_resize() and dev_fbf_resize_window() functions. 349 * It must be called by a local thread, running in the cluster containing the modified VSL. 344 350 * Use the RPC_VMM_RESIZE_VSEG if required. 345 * It makes a kernel panic if the process is not registered in the local cluster,346 * or if the vseg is not registered in the process VSL.347 * The new vseg, defined by the <new_base> and <new_size> arguments must be strictly348 * included in the target vseg. The target VSL size and base fields are modified in the VSL.349 * If the new vseg contains less pages than the target vseg, the relevant pages are350 * removed from the GPT.351 351 * The VSL lock protecting the VSL must be taken by the caller. 352 352 ********************************************************************************************* … … 454 454 ppn_t * ppn ); 455 455 456 457 456 #endif /* _VMM_H_ */
Note: See TracChangeset
for help on using the changeset viewer.