Index: trunk/kernel/mm/mapper.c
===================================================================
--- trunk/kernel/mm/mapper.c	(revision 606)
+++ trunk/kernel/mm/mapper.c	(revision 610)
@@ -188,10 +188,11 @@
         {
 
+            if( mapper_cxy == local_cxy )   // mapper is local
+            {
+
 #if (DEBUG_MAPPER_GET_PAGE & 1)
 if( DEBUG_MAPPER_GET_PAGE < cycle )
-printk("\n[%s] missing page => load it from IOC device\n", __FUNCTION__ );
-#endif
-            if( mapper_cxy == local_cxy )   // mapper is local
-            {
+printk("\n[%s] missing page => load it from FS / local access \n", __FUNCTION__ );
+#endif
                  error = mapper_handle_miss( mapper_ptr,
                                              page_id, 
@@ -200,4 +201,9 @@
             else
             {
+
+#if (DEBUG_MAPPER_GET_PAGE & 1)
+if( DEBUG_MAPPER_GET_PAGE < cycle )
+printk("\n[%s] missing page => load it from FS / RPC access \n", __FUNCTION__ );
+#endif
                  rpc_mapper_handle_miss_client( mapper_cxy,
                                                 mapper_ptr,
@@ -253,12 +259,13 @@
 vfs_inode_t * inode = mapper->inode;
 vfs_inode_get_name( XPTR( local_cxy , inode ) , name );
-if( DEBUG_MAPPER_HANDLE_MISS < cycle )
-printk("\n[%s] enter for page %d in <%s> / cycle %d\n",
+// if( DEBUG_MAPPER_HANDLE_MISS < cycle )
+// if( (page_id == 1) && (cycle > 10000000) )
+printk("\n[%s] enter for page %d in <%s> / cycle %d",
 __FUNCTION__, page_id, name, cycle );
 if( DEBUG_MAPPER_HANDLE_MISS & 1 )
-grdxt_display( &mapper->rt , name );
-#endif
-
-    // allocate one page from the mapper cluster
+grdxt_display( XPTR( local_cxy , &mapper->rt ) , name );
+#endif
+
+    // allocate one page from the local cluster
     req.type  = KMEM_PAGE;
     req.size  = 0;
@@ -313,9 +320,10 @@
 #if DEBUG_MAPPER_HANDLE_MISS
 cycle = (uint32_t)hal_get_cycles();
-if( DEBUG_MAPPER_HANDLE_MISS < cycle )
-printk("\n[%s] exit for page %d in <%s> / ppn %x / cycle %d\n",
+// if( DEBUG_MAPPER_HANDLE_MISS < cycle )
+// if( (page_id == 1) && (cycle > 10000000) )
+printk("\n[%s] exit for page %d in <%s> / ppn %x / cycle %d",
 __FUNCTION__, page_id, name, ppm_page2ppn( *page_xp ), cycle );
 if( DEBUG_MAPPER_HANDLE_MISS & 1 )
-grdxt_display( &mapper->rt , name );
+grdxt_display( XPTR( local_cxy , &mapper->rt ) , name );
 #endif
 
@@ -348,6 +356,6 @@
 }  // end mapper_release_page()
 
-////////////////////////////////////////////
-error_t mapper_move_user( mapper_t * mapper,
+///////////////////////////////////////////////
+error_t mapper_move_user( xptr_t     mapper_xp,
                           bool_t     to_buffer,
                           uint32_t   file_offset,
@@ -355,5 +363,4 @@
                           uint32_t   size )
 {
-    xptr_t     mapper_xp;      // extended pointer on local mapper
     uint32_t   page_offset;    // first byte to move to/from a mapper page
     uint32_t   page_count;     // number of bytes to move to/from a mapper page
@@ -371,7 +378,4 @@
 #endif
 
-    // build extended pointer on mapper
-    mapper_xp = XPTR( local_cxy , mapper );
-
     // compute offsets of first and last bytes in file
     uint32_t min_byte = file_offset;
@@ -384,5 +388,6 @@
 #if (DEBUG_MAPPER_MOVE_USER & 1)
 if( DEBUG_MAPPER_MOVE_USER < cycle )
-printk("\n[%s] first_page %d / last_page %d\n", __FUNCTION__, first, last );
+printk("\n[%s] thread[%x,%x] : first_page %d / last_page %d\n",
+__FUNCTION__, this->process->pid, this->trdid, first, last );
 #endif
 
@@ -404,6 +409,6 @@
 #if (DEBUG_MAPPER_MOVE_USER & 1)
 if( DEBUG_MAPPER_MOVE_USER < cycle )
-printk("\n[%s] page_id = %d / page_offset = %d / page_count = %d\n",
-__FUNCTION__ , page_id , page_offset , page_count );
+printk("\n[%s] thread[%x,%x] : page_id = %d / page_offset = %d / page_count = %d\n",
+__FUNCTION__, this->process->pid, this->trdid, page_id , page_offset , page_count );
 #endif
 
@@ -412,4 +417,10 @@
 
         if ( page_xp == XPTR_NULL ) return -1;
+
+#if (DEBUG_MAPPER_MOVE_USER & 1)
+if( DEBUG_MAPPER_MOVE_USER < cycle )
+printk("\n[%s] thread[%x,%x] : get page (%x,%x) from mapper\n",
+__FUNCTION__, this->process->pid, this->trdid, GET_CXY(page_xp), GET_PTR(page_xp) );
+#endif
 
         // compute pointer in mapper
@@ -547,4 +558,10 @@
         }
 
+#if (DEBUG_MAPPER_MOVE_KERNEL & 1)
+if( DEBUG_MAPPER_MOVE_KERNEL < cycle )
+printk("\n[%s] src_cxy %x / src_ptr %x / dst_cxy %x / dst_ptr %x\n",
+__FUNCTION__, src_cxy, src_ptr, dst_cxy, dst_ptr );
+#endif
+
         // move fragment
         hal_remote_memcpy( XPTR( dst_cxy , dst_ptr ), XPTR( src_cxy , src_ptr ), page_count );
