Index: trunk/kernel/mm/vmm.h
===================================================================
--- trunk/kernel/mm/vmm.h	(revision 625)
+++ trunk/kernel/mm/vmm.h	(revision 629)
@@ -106,5 +106,6 @@
  * 3. The GPT in the reference cluster can be directly accessed by remote threads to handle
  *    false page-fault (page is mapped in the reference GPT, but the PTE copy is missing
- *    in the local GPT). It is also protected by a remote_rwlock. 
+ *    in the local GPT). As each PTE can be protected by a specific GPT_LOCKED attribute
+ *    for exclusive access, it is NOT protected by a global lock. 
  ********************************************************************************************/
 
@@ -115,5 +116,4 @@
 	uint32_t         vsegs_nr;           /*! total number of local vsegs                    */
 
-    remote_rwlock_t  gpt_lock;           /*! lock protecting the local GPT                  */
     gpt_t            gpt;                /*! Generic Page Table (complete in reference)     */
 
@@ -165,11 +165,11 @@
  * This function is called by the process_make_fork() function. It partially copies
  * the content of a remote parent process VMM to the local child process VMM:
- * - All DATA, ANON, REMOTE vsegs registered in the parent VSL are registered in the
+ * - The DATA, ANON, REMOTE vsegs registered in the parent VSL are registered in the
  *   child VSL. All valid PTEs in parent GPT are copied to the child GPT, but the 
  *   WRITABLE flag is reset and the COW flag is set.
- * - All CODE vsegs registered in the parent VSL are registered in the child VSL, but the
+ * - The CODE vsegs registered in the parent VSL are registered in the child VSL, but the
  *   GPT entries are not copied in the child GPT, and will be dynamically updated from
  *   the .elf file when a page fault is reported.
- * - All FILE vsegs registered in the parent VSL are registered in the child VSL, and all
+ * - The FILE vsegs registered in the parent VSL are registered in the child VSL, and all
  *   valid GPT entries in parent GPT are copied to the child GPT. The COW flag is not set.
  * - No STACK vseg is copied from  parent VMM to child VMM, because the child stack vseg
@@ -186,7 +186,7 @@
 
 /*********************************************************************************************
- * This function is called by the process_make_fork() function executing the fork syscall.
- * It set the COW flag, and reset the WRITABLE flag of all GPT entries of the DATA, MMAP,
- * and REMOTE vsegs of a process identified by the <process> argument.
+ * This function is called by the process_make_fork() function to update the COW attribute
+ * in the parent parent process vsegs. It set the COW flag, and reset the WRITABLE flag of
+ * all GPT entries of the DATA, MMAP, and REMOTE vsegs of the <process> argument.
  * It must be called by a thread running in the reference cluster, that contains the complete
  * VSL and GPT (use the rpc_vmm_set_cow_client() when the calling thread client is remote). 
@@ -201,10 +201,10 @@
 
 /*********************************************************************************************
- * This function modifies a GPT entry identified by the <process> and <vpn> arguments
+ * This function modifies one GPT entry identified by the <process> and <vpn> arguments
  * in all clusters containing a process copy.
- * It must be called by a thread running in the reference cluster.
- * It updates all copies of the process in all clusters, to maintain coherence in GPT copies,
- * using the list of copies stored in the owner process, and using remote_write accesses to
- * update the remote GPTs. It cannot fail, as only mapped entries in GPT copies are updated.
+ * It must be called by a thread running in the process owner cluster.
+ * It is used to update to maintain coherence in GPT copies, using the list of copies 
+ * stored in the owner process, and uses remote_write accesses.
+ * It cannot fail, as only mapped PTE2 in GPT copies are updated.
  *********************************************************************************************
  * @ process   : local pointer on local process descriptor.
@@ -373,10 +373,10 @@
  *    is mapped in the reference GPT, but not in the local GPT. For this false page-fault,
  *    the local GPT is simply updated from the reference GPT.
- * 3) if the missing VPN is public, and unmapped in the reference GPT, it's a true page fault.
+ * 3) if the missing VPN is public, and unmapped in the ref GPT, it is a true page fault.
  *    The calling thread  allocates a new physical page, computes the attributes, depending
  *    on vseg type, and updates directly (without RPC) the local GPT and the reference GPT.
  *    Other GPT copies  will updated on demand.
- * Concurrent accesses to the GPT are handled, thanks to the 
- * remote_rwlock protecting each GPT copy.
+ * Concurrent accesses to the GPT(s) are handled, by locking the target PTE before accessing
+ * the local and/or reference GPT(s).
  *********************************************************************************************
  * @ process  : local pointer on local process.
@@ -392,6 +392,5 @@
  * It returns a kernel panic if VPN is not in a registered vseg or is not mapped.
  * For a legal mapped vseg there is two cases:
- * 1) If the missing VPN belongs to a private vseg (STACK or CODE segment types, non
- *    replicated in all clusters), it access the local GPT to get the current PPN and ATTR.
+ * 1) If the missing VPN belongs to a private vseg (STACK), it access only the local GPT.
  *    It access the forks counter in the current physical page descriptor.
  *    If there is a pending fork, it allocates a new physical page from the cluster defined 
@@ -399,6 +398,6 @@
  *    and decrements the pending_fork counter in old physical page descriptor.
  *    Finally, it reset the COW flag and set the WRITE flag in local GPT.
- * 2) If the missing VPN is public, it access the reference GPT to get the current PPN and
- *    ATTR. It access the forks counter in the current physical page descriptor.
+ * 2) If the missing VPN is public, it access only the reference GPT.
+ *    It access the forks counter in the current physical page descriptor.
  *    If there is a pending fork, it allocates a new physical page from the cluster defined 
  *    by the vseg type, copies the old physical page content to the new physical page,
@@ -406,6 +405,6 @@
  *    Finally it calls the vmm_global_update_pte() function to reset the COW flag and set
  *    the WRITE flag in all the GPT copies, using a RPC if the reference cluster is remote.
- * In both cases, concurrent accesses to the GPT are protected by the remote_rwlock 
- * atached to the GPT copy in VMM.
+ * In both cases, concurrent accesses to the GPT are handled by locking the target PTE
+ * before accessing the GPT.
  *********************************************************************************************
  * @ process   : pointer on local process descriptor copy.
