Changeset 437 for trunk/kernel/kern
- Timestamp:
- Mar 28, 2018, 2:40:29 PM (7 years ago)
- Location:
- trunk/kernel/kern
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/kern/chdev.c
r436 r437 140 140 thread_t * this = CURRENT_THREAD; 141 141 142 #if CONFIG_DEBUG_CHDEV_REGISTER_COMMAND143 uint32_t cycle = (uint32_t)hal_get_cycles();144 if( CONFIG_DEBUG_CHDEV_REGISTER_COMMAND < cycle )145 printk("\n[DBG] %s : client_thread %x (%s) enter / cycle %d\n",146 __FUNCTION__, this, thread_type_str(this->type) , cycle );147 #endif148 149 142 // get device descriptor cluster and local pointer 150 143 cxy_t chdev_cxy = GET_CXY( chdev_xp ); 151 144 chdev_t * chdev_ptr = (chdev_t *)GET_PTR( chdev_xp ); 145 146 #if (CONFIG_DEBUG_CHDEV_CMD_RX || CONFIG_DEBUG_CHDEV_CMD_TX) 147 bool_t is_rx = hal_remote_lw( XPTR( chdev_cxy , &chdev_ptr->is_rx ) ); 148 #endif 149 150 #if CONFIG_DEBUG_CHDEV_CMD_RX 151 uint32_t rx_cycle = (uint32_t)hal_get_cycles(); 152 if( (is_rx) && (CONFIG_DEBUG_CHDEV_CMD_RX < rx_cycle) ) 153 printk("\n[DBG] %s : client_thread %x (%s) enter for RX / cycle %d\n", 154 __FUNCTION__, this, thread_type_str(this->type) , rx_cycle ); 155 #endif 156 157 #if CONFIG_DEBUG_CHDEV_CMD_TX 158 uint32_t tx_cycle = (uint32_t)hal_get_cycles(); 159 if( (is_rx == 0) && (CONFIG_DEBUG_CHDEV_CMD_TX < tx_cycle) ) 160 printk("\n[DBG] %s : client_thread %x (%s) enter for TX / cycle %d\n", 161 __FUNCTION__, this, thread_type_str(this->type) , tx_cycle ); 162 #endif 152 163 153 164 // build extended pointers on client thread xlist and device root … … 196 207 hal_restore_irq( save_sr ); 197 208 198 #if CONFIG_DEBUG_CHDEV_REGISTER_COMMAND 199 cycle = (uint32_t)hal_get_cycles(); 200 if( CONFIG_DEBUG_CHDEV_REGISTER_COMMAND < cycle ) 201 printk("\n[DBG] %s : client_thread %x (%s) exit / cycle %d\n", 202 __FUNCTION__, this, thread_type_str(this->type) , cycle ); 209 #if CONFIG_DEBUG_CHDEV_CMD_RX 210 rx_cycle = (uint32_t)hal_get_cycles(); 211 if( (is_rx) && (CONFIG_DEBUG_CHDEV_CMD_RX < rx_cycle) ) 212 printk("\n[DBG] %s : client_thread %x (%s) exit for RX / cycle %d\n", 213 __FUNCTION__, this, thread_type_str(this->type) , rx_cycle ); 214 #endif 215 216 #if CONFIG_DEBUG_CHDEV_CMD_TX 217 tx_cycle = (uint32_t)hal_get_cycles(); 218 if( (is_rx == 0) && (CONFIG_DEBUG_CHDEV_CMD_TX < tx_cycle) ) 219 printk("\n[DBG] %s : client_thread %x (%s) exit for TX / cycle %d\n", 220 __FUNCTION__, this, thread_type_str(this->type) , tx_cycle ); 203 221 #endif 204 222 … … 225 243 server = CURRENT_THREAD; 226 244 227 #if CONFIG_DEBUG_CHDEV_SEQUENCIAL_SERVER 228 uint32_t cycle = (uint32_t)hal_get_cycles(); 229 if( CONFIG_DEBUG_CHDEV_SEQUENCIAL_SERVER < cycle ) 230 printk("\n[DBG] %s : server_thread %x enter / chdev = %x / cycle %d\n", 231 __FUNCTION__ , server , chdev , cycle ); 232 #endif 233 245 // get root and lock on command queue 234 246 root_xp = XPTR( local_cxy , &chdev->wait_root ); 235 247 lock_xp = XPTR( local_cxy , &chdev->wait_lock ); … … 253 265 else // waiting queue not empty 254 266 { 255 256 #if (CONFIG_DEBUG_SYS_READ & 1)257 enter_chdev_server_read = (uint32_t)hal_get_cycles();258 #endif259 260 #if (CONFIG_DEBUG_SYS_WRITE & 1)261 enter_chdev_server_write = (uint32_t)hal_get_cycles();262 #endif263 264 267 // release lock 265 268 remote_spinlock_unlock( lock_xp ); … … 271 274 client_cxy = GET_CXY( client_xp ); 272 275 client_ptr = (thread_t *)GET_PTR( client_xp ); 276 277 #if CONFIG_DEBUG_CHDEV_SERVER_RX 278 uint32_t rx_cycle = (uint32_t)hal_get_cycles(); 279 if( (chdev->is_rx) && (CONFIG_DEBUG_CHDEV_SERVER_RX < rx_cycle) ) 280 printk("\n[DBG] %s : server_thread %x start RX / client %x / cycle %d\n", 281 __FUNCTION__ , server , client_ptr , rx_cycle ); 282 #endif 283 284 #if CONFIG_DEBUG_CHDEV_SERVER_TX 285 uint32_t tx_cycle = (uint32_t)hal_get_cycles(); 286 if( (chdev->is_rx == 0) && (CONFIG_DEBUG_CHDEV_SERVER_TX < tx_cycle) ) 287 printk("\n[DBG] %s : server_thread %x start TX / client %x / cycle %d\n", 288 __FUNCTION__ , server , client_ptr , tx_cycle ); 289 #endif 290 291 #if (CONFIG_DEBUG_SYS_READ & 1) 292 enter_chdev_server_read = (uint32_t)hal_get_cycles(); 293 #endif 294 295 #if (CONFIG_DEBUG_SYS_WRITE & 1) 296 enter_chdev_server_write = (uint32_t)hal_get_cycles(); 297 #endif 273 298 274 299 // call driver command function to execute I/O operation … … 283 308 thread_unblock( client_xp , THREAD_BLOCKED_IO ); 284 309 285 #if CONFIG_DEBUG_CHDEV_SEQUENCIAL_SERVER 286 cycle = (uint32_t)hal_get_cycles(); 287 if( CONFIG_DEBUG_CHDEV_SEQUENCIAL_SERVER < cycle ) 288 printk("\n[DBG] %s : server_thread %x complete operation for client %x / cycle %d\n", 289 __FUNCTION__ , server , client_ptr , cycle ); 310 #if CONFIG_DEBUG_CHDEV_SERVER_RX 311 rx_cycle = (uint32_t)hal_get_cycles(); 312 if( (chdev->is_rx) && (CONFIG_DEBUG_CHDEV_SERVER_RX < rx_cycle) ) 313 printk("\n[DBG] %s : server_thread %x completes RX / client %x / cycle %d\n", 314 __FUNCTION__ , server , client_ptr , rx_cycle ); 315 #endif 316 317 #if CONFIG_DEBUG_CHDEV_SERVER_TX 318 tx_cycle = (uint32_t)hal_get_cycles(); 319 if( (chdev->is_rx == 0) && (CONFIG_DEBUG_CHDEV_SERVER_TX < tx_cycle) ) 320 printk("\n[DBG] %s : server_thread %x completes TX / client %x / cycle %d\n", 321 __FUNCTION__ , server , client_ptr , tx_cycle ); 290 322 #endif 291 323 -
trunk/kernel/kern/cluster.c
r436 r437 4 4 * Author Ghassan Almaless (2008,2009,2010,2011,2012) 5 5 * Mohamed Lamine Karaoui (2015) 6 * Alain Greiner (2016,2017 )6 * Alain Greiner (2016,2017,2018) 7 7 * 8 8 * Copyright (c) UPMC Sorbonne Universites … … 92 92 uint32_t cycle = (uint32_t)hal_get_cycles(); 93 93 if( CONFIG_DEBUG_CLUSTER_INIT < cycle ) 94 printk("\n[DBG] %s enters for cluster %x / cycle %d\n",95 __FUNCTION__ , local_cxy , cycle );94 printk("\n[DBG] %s : thread %x enters for cluster %x / cycle %d\n", 95 __FUNCTION__ , CURRENT_THREAD , local_cxy , cycle ); 96 96 #endif 97 97 … … 113 113 } 114 114 115 #if CONFIG_DEBUG_CLUSTER_INIT115 #if( CONFIG_DEBUG_CLUSTER_INIT & 1 ) 116 116 cycle = (uint32_t)hal_get_cycles(); 117 117 if( CONFIG_DEBUG_CLUSTER_INIT < cycle ) 118 cluster_dmsg("\n[DBG] %s : PPM initialized in cluster %x / cycle %d\n",118 printk("\n[DBG] %s : PPM initialized in cluster %x / cycle %d\n", 119 119 __FUNCTION__ , local_cxy , cycle ); 120 120 #endif … … 123 123 khm_init( &cluster->khm ); 124 124 125 cluster_dmsg("\n[DBG] %s : KHM initialized in cluster %x at cycle %d\n", 126 __FUNCTION__ , local_cxy , hal_get_cycles() ); 125 #if( CONFIG_DEBUG_CLUSTER_INIT & 1 ) 126 uint32_t cycle = (uint32_t)hal_get_cycles(); 127 if( CONFIG_DEBUG_CLUSTER_INIT < cycle ) 128 printk("\n[DBG] %s : KHM initialized in cluster %x at cycle %d\n", 129 __FUNCTION__ , local_cxy , hal_get_cycles() ); 130 #endif 127 131 128 132 // initialises embedded KCM 129 133 kcm_init( &cluster->kcm , KMEM_KCM ); 130 134 131 cluster_dmsg("\n[DBG] %s : KCM initialized in cluster %x at cycle %d\n", 132 __FUNCTION__ , local_cxy , hal_get_cycles() ); 135 #if( CONFIG_DEBUG_CLUSTER_INIT & 1 ) 136 uint32_t cycle = (uint32_t)hal_get_cycles(); 137 if( CONFIG_DEBUG_CLUSTER_INIT < cycle ) 138 printk("\n[DBG] %s : KCM initialized in cluster %x at cycle %d\n", 139 __FUNCTION__ , local_cxy , hal_get_cycles() ); 140 #endif 133 141 134 142 // initialises all cores descriptors … … 140 148 } 141 149 142 #if CONFIG_DEBUG_CLUSTER_INIT150 #if( CONFIG_DEBUG_CLUSTER_INIT & 1 ) 143 151 cycle = (uint32_t)hal_get_cycles(); 144 152 if( CONFIG_DEBUG_CLUSTER_INIT < cycle ) 145 cluster_dmsg("\n[DBG] %s : cores initialized in cluster %x / cycle %d\n",153 printk("\n[DBG] %s : cores initialized in cluster %x / cycle %d\n", 146 154 __FUNCTION__ , local_cxy , cycle ); 147 155 #endif … … 151 159 cluster->rpc_threads = 0; 152 160 153 cluster_dmsg("\n[DBG] %s : RPC fifo inialized in cluster %x at cycle %d\n", 161 #if( CONFIG_DEBUG_CLUSTER_INIT & 1 ) 162 cycle = (uint32_t)hal_get_cycles(); 163 if( CONFIG_DEBUG_CLUSTER_INIT < cycle ) 164 printk("\n[DBG] %s : RPC fifo inialized in cluster %x at cycle %d\n", 154 165 __FUNCTION__ , local_cxy , hal_get_cycles() ); 166 #endif 155 167 156 168 // initialise pref_tbl[] in process manager … … 179 191 cycle = (uint32_t)hal_get_cycles(); 180 192 if( CONFIG_DEBUG_CLUSTER_INIT < cycle ) 181 cluster_dmsg("\n[DBG] %s Process Manager initialized incluster %x / cycle %d\n",182 __FUNCTION__ , local_cxy , cycle );193 printk("\n[DBG] %s , thread %x exit for cluster %x / cycle %d\n", 194 __FUNCTION__ , CURRENT_THREAD , local_cxy , cycle ); 183 195 #endif 184 196 -
trunk/kernel/kern/cluster.h
r433 r437 4 4 * authors Ghassan Almaless (2008,2009,2010,2011,2012) 5 5 * Mohamed Lamine Karaoui (2015) 6 * Alain Greiner (2016,2017 )6 * Alain Greiner (2016,2017,2018) 7 7 * 8 8 * Copyright (c) UPMC Sorbonne Universites -
trunk/kernel/kern/do_syscall.c
r428 r437 78 78 sys_closedir, // 25 79 79 sys_getcwd, // 26 80 sys_ undefined,// 2780 sys_isatty, // 27 81 81 sys_alarm, // 28 82 82 sys_rmdir, // 29 -
trunk/kernel/kern/dqdt.c
r406 r437 2 2 * dqdt.c - Distributed Quaternary Decision Tree implementation. 3 3 * 4 * Author : Alain Greiner (2016 )4 * Author : Alain Greiner (2016,2017,2018) 5 5 * 6 6 * Copyright (c) UPMC Sorbonne Universites -
trunk/kernel/kern/dqdt.h
r19 r437 2 2 * kern/dqdt.h - Distributed Quad Decision Tree 3 3 * 4 * Author : Alain Greiner (2016 )4 * Author : Alain Greiner (2016,2017,2018) 5 5 * 6 6 * Copyright (c) UPMC Sorbonne Universites … … 40 40 * 41 41 * - If both Y_SIZE and Y_SIZE are larger than 1, it makes the assumption that 42 * the cluster topology is a 2D mesh. The [X,Y] coordinates of a cluster are42 * the clusters topology is a 2D mesh. The [X,Y] coordinates of a cluster are 43 43 * obtained from the CXY identifier using the following rules : 44 44 * X = CXY >> Y_WIDTH / Y = CXY & ((1<<Y_WIDTH)-1) … … 93 93 94 94 /**************************************************************************************** 95 * This recursive function displays usage information for all DQDT nodes in the subtree96 * defined by the node argument. It traverses the quadtree from root to bottom.97 ****************************************************************************************98 * @ node_xp : extended pointer on a DQDT node.99 ***************************************************************************************/100 void dqdt_global_print( xptr_t node_xp );101 102 /****************************************************************************************103 * This function displays summary usage information in a given DQDT local node.104 ****************************************************************************************105 * @ node : local pointer on a DQDT node.106 ***************************************************************************************/107 void dqdt_local_print( dqdt_node_t * node );108 109 /****************************************************************************************110 95 * This recursive function traverses the DQDT quad-tree from bottom to root, to propagate 111 96 * the change in the threads number and allocated pages number in a leaf cluster, … … 153 138 cxy_t dqdt_get_cluster_for_memory(); 154 139 140 /**************************************************************************************** 141 * This recursive function displays usage information for all DQDT nodes in the subtree 142 * defined by the node argument. It traverses the quadtree from root to bottom. 143 **************************************************************************************** 144 * @ node_xp : extended pointer on a DQDT node. 145 ***************************************************************************************/ 146 void dqdt_global_print( xptr_t node_xp ); 147 148 /**************************************************************************************** 149 * This function displays summary usage information in a given DQDT local node. 150 **************************************************************************************** 151 * @ node : local pointer on a DQDT node. 152 ***************************************************************************************/ 153 void dqdt_local_print( dqdt_node_t * node ); 154 155 155 156 156 #endif /* _DQDT_H_ */ -
trunk/kernel/kern/kernel_init.c
r436 r437 324 324 } 325 325 326 #if( CONFIG_ KINIT_DEBUG& 0x1 )327 if( hal_time_stamp() > CONFIG_ KINIT_DEBUG)326 #if( CONFIG_DEBUG_KERNEL_INIT & 0x1 ) 327 if( hal_time_stamp() > CONFIG_DEBUG_KERNEL_INIT ) 328 328 printk("\n[DBG] %s : created MMC in cluster %x / chdev = %x\n", 329 329 __FUNCTION__ , local_cxy , chdev_ptr ); … … 353 353 chdev_dir.dma[channel] = XPTR( local_cxy , chdev_ptr ); 354 354 355 #if( CONFIG_ KINIT_DEBUG& 0x1 )356 if( hal_time_stamp() > CONFIG_ KINIT_DEBUG)355 #if( CONFIG_DEBUG_KERNEL_INIT & 0x1 ) 356 if( hal_time_stamp() > CONFIG_DEBUG_KERNEL_INIT ) 357 357 printk("\n[DBG] %s : created DMA[%d] in cluster %x / chdev = %x\n", 358 358 __FUNCTION__ , channel , local_cxy , chdev_ptr ); … … 488 488 } 489 489 490 #if( CONFIG_ KINIT_DEBUG& 0x1 )491 if( hal_time_stamp() > CONFIG_ KINIT_DEBUG)490 #if( CONFIG_DEBUG_KERNEL_INIT & 0x1 ) 491 if( hal_time_stamp() > CONFIG_DEBUG_KERNEL_INIT ) 492 492 printk("\n[DBG] %s : create chdev %s / channel = %d / rx = %d / cluster %x / chdev = %x\n", 493 493 __FUNCTION__ , chdev_func_str( func ), channel , rx , local_cxy , chdev ); … … 623 623 } 624 624 625 #if( CONFIG_ KINIT_DEBUG& 0x1 )626 if( hal_time_stamp() > CONFIG_ KINIT_DEBUG)625 #if( CONFIG_DEBUG_KERNEL_INIT & 0x1 ) 626 if( hal_time_stamp() > CONFIG_DEBUG_KERNEL_INIT ) 627 627 { 628 628 printk("\n[DBG] %s created PIC chdev in cluster %x at cycle %d\n", … … 792 792 thread->core = &LOCAL_CLUSTER->core_tbl[core_lid]; 793 793 794 #if CONFIG_LOCKS_DEBUG 794 // each core initializes the idle thread lists of locks 795 795 list_root_init( &thread->locks_root ); 796 796 xlist_root_init( XPTR( local_cxy , &thread->xlocks_root ) ); 797 #endif 797 thread->local_locks = 0; 798 thread->remote_locks = 0; 798 799 799 800 // CP0 in I/O cluster initialises TXT0 chdev descriptor … … 804 805 (info->x_size * info->y_size) ); 805 806 barrier_wait( &local_barrier , info->cores_nr ); 806 807 if( (core_lid == 0) && (local_cxy == 0) ) 808 kinit_dmsg("\n[DBG] %s : exit barrier 0 : TXT0 initialized / cycle %d\n", 809 __FUNCTION__, hal_time_stamp() ); 807 ///////////////////////////////////////////////////////////////////////////////// 808 809 #if CONFIG_DEBUG_KERNEL_INIT 810 if( (core_lid == 0) && (local_cxy == 0) ) 811 printk("\n[DBG] %s : exit barrier 0 : TXT0 initialized / cycle %d\n", 812 __FUNCTION__, (uint32_t)hal_get_cycles() ); 813 #endif 810 814 811 815 ///////////////////////////////////////////////////////////////////////////// … … 841 845 ///////////////////////////////////////////////////////////////////////////////// 842 846 843 if( (core_lid == 0) && (local_cxy == 0) ) 844 kinit_dmsg("\n[DBG] %s : exit barrier 1 : clusters initialised / cycle %d\n", 845 __FUNCTION__, hal_time_stamp() ); 847 #if CONFIG_DEBUG_KERNEL_INIT 848 if( (core_lid == 0) && (local_cxy == 0) ) 849 printk("\n[DBG] %s : exit barrier 1 : clusters initialised / cycle %d\n", 850 __FUNCTION__, (uint32_t)hal_get_cycles() ); 851 #endif 846 852 847 853 ///////////////////////////////////////////////////////////////////////////////// … … 866 872 //////////////////////////////////////////////////////////////////////////////// 867 873 868 if( (core_lid == 0) && (local_cxy == 0) ) 869 kinit_dmsg("\n[DBG] %s : exit barrier 2 : PIC initialised / cycle %d\n", 870 __FUNCTION__, hal_time_stamp() ); 874 #if CONFIG_DEBUG_KERNEL_INIT 875 if( (core_lid == 0) && (local_cxy == 0) ) 876 printk("\n[DBG] %s : exit barrier 2 : PIC initialised / cycle %d\n", 877 __FUNCTION__, (uint32_t)hal_get_cycles() ); 878 #endif 871 879 872 880 //////////////////////////////////////////////////////////////////////////////// … … 897 905 ///////////////////////////////////////////////////////////////////////////////// 898 906 899 if( (core_lid == 0) && (local_cxy == 0) ) 900 kinit_dmsg("\n[DBG] %s : exit barrier 3 : all chdev initialised / cycle %d\n", 901 __FUNCTION__, hal_time_stamp()); 902 907 #if CONFIG_DEBUG_KERNEL_INIT 908 if( (core_lid == 0) && (local_cxy == 0) ) 909 printk("\n[DBG] %s : exit barrier 3 : all chdev initialised / cycle %d\n", 910 __FUNCTION__, (uint32_t)hal_get_cycles() ); 911 #endif 912 913 #if( CONFIG_DEBUG_KERNEL_INIT & 1 ) 914 chdev_dir_display(); 915 #endif 916 903 917 ///////////////////////////////////////////////////////////////////////////////// 904 918 // STEP 4 : All cores enable IPI (Inter Procesor Interrupt), … … 908 922 ///////////////////////////////////////////////////////////////////////////////// 909 923 910 #if CONFIG_KINIT_DEBUG911 chdev_dir_display();912 #endif913 914 924 // All cores enable the shared IPI channel 915 925 dev_pic_enable_ipi(); … … 932 942 core->scheduler.idle = thread; 933 943 934 #if CONFIG_KINIT_DEBUG944 #if( CONFIG_DEBUG_KERNEL_INIT & 1 ) 935 945 sched_display( core_lid ); 936 946 #endif … … 1004 1014 ///////////////////////////////////////////////////////////////////////////////// 1005 1015 1006 if( (core_lid == 0) && (local_cxy == 0) ) 1007 kinit_dmsg("\n[DBG] %s : exit barrier 4 : VFS_root = %l in cluster 0 / cycle %d\n", 1008 __FUNCTION__, vfs_root_inode_xp , hal_time_stamp()); 1016 #if CONFIG_DEBUG_KERNEL_INIT 1017 if( (core_lid == 0) && (local_cxy == 0) ) 1018 printk("\n[DBG] %s : exit barrier 4 : VFS_root = %l in cluster 0 / cycle %d\n", 1019 __FUNCTION__, vfs_root_inode_xp , (uint32_t)hal_get_cycles()); 1020 #endif 1009 1021 1010 1022 ///////////////////////////////////////////////////////////////////////////////// … … 1063 1075 ///////////////////////////////////////////////////////////////////////////////// 1064 1076 1065 if( (core_lid == 0) && (local_cxy == 0) ) 1066 kinit_dmsg("\n[DBG] %s : exit barrier 5 : VFS_root = %l in cluster IO / cycle %d\n", 1067 __FUNCTION__, vfs_root_inode_xp , hal_time_stamp() ); 1077 #if CONFIG_DEBUG_KERNEL_INIT 1078 if( (core_lid == 0) && (local_cxy == io_cxy) ) 1079 printk("\n[DBG] %s : exit barrier 5 : VFS_root = %l in cluster %x / cycle %d\n", 1080 __FUNCTION__, vfs_root_inode_xp , io_cxy , (uint32_t)hal_get_cycles()); 1081 #endif 1068 1082 1069 1083 ///////////////////////////////////////////////////////////////////////////////// … … 1096 1110 ///////////////////////////////////////////////////////////////////////////////// 1097 1111 1098 if( (core_lid == 0) && (local_cxy == 0) ) 1099 kinit_dmsg("\n[DBG] %s : exit barrier 6 : dev_root = %l in cluster IO / cycle %d\n", 1100 __FUNCTION__, devfs_dev_inode_xp , hal_time_stamp() ); 1112 #if CONFIG_DEBUG_KERNEL_INIT 1113 if( (core_lid == 0) && (local_cxy == io_cxy) ) 1114 printk("\n[DBG] %s : exit barrier 6 : dev_root = %l in cluster %x / cycle %d\n", 1115 __FUNCTION__, devfs_dev_inode_xp , io_cxy , (uint32_t)hal_get_cycles() ); 1116 #endif 1101 1117 1102 1118 ///////////////////////////////////////////////////////////////////////////////// … … 1133 1149 ///////////////////////////////////////////////////////////////////////////////// 1134 1150 1151 #if CONFIG_DEBUG_KERNEL_INIT 1152 if( (core_lid == 0) && (local_cxy == 0) ) 1153 printk("\n[DBG] %s : exit barrier 7 : dev_root = %l in cluster 0 / cycle %d\n", 1154 __FUNCTION__, devfs_dev_inode_xp , (uint32_t)hal_get_cycles() ); 1155 #endif 1156 1157 ///////////////////////////////////////////////////////////////////////////////// 1158 // STEP 8 : CP0 in cluster 0 creates the first user process (process_init) 1159 ///////////////////////////////////////////////////////////////////////////////// 1160 1135 1161 if( (core_lid == 0) && (local_cxy == 0) ) 1136 kinit_dmsg("\n[DBG] %s : exit barrier 7 : dev_root = %l in cluster 0 / cycle %d\n", 1137 __FUNCTION__, devfs_dev_inode_xp , hal_time_stamp() ); 1138 1139 ///////////////////////////////////////////////////////////////////////////////// 1140 // STEP 8 : CP0 in cluster 0 creates the first user process (process_init) 1141 ///////////////////////////////////////////////////////////////////////////////// 1142 1143 if( (core_lid == 0) && (local_cxy == 0) ) 1144 { 1145 1146 #if CONFIG_KINIT_DEBUG 1162 { 1163 1164 #if( CONFIG_DEBUG_KERNEL_INIT & 1 ) 1147 1165 vfs_display( vfs_root_inode_xp ); 1148 1166 #endif … … 1157 1175 ///////////////////////////////////////////////////////////////////////////////// 1158 1176 1159 if( (core_lid == 0) && (local_cxy == 0) ) 1160 kinit_dmsg("\n[DBG] %s : exit barrier 8 : process init created / cycle %d\n", 1161 __FUNCTION__ , hal_time_stamp() ); 1177 #if CONFIG_DEBUG_KERNEL_INIT 1178 if( (core_lid == 0) && (local_cxy == 0) ) 1179 printk("\n[DBG] %s : exit barrier 8 : process init created / cycle %d\n", 1180 __FUNCTION__ , (uint32_t)hal_get_cycles() ); 1181 #endif 1162 1182 1163 1183 ///////////////////////////////////////////////////////////////////////////////// … … 1169 1189 print_banner( (info->x_size * info->y_size) , info->cores_nr ); 1170 1190 1171 #if CONFIG_KINIT_DEBUG 1172 1173 printk("\n\n***** memory fooprint for main kernel objects\n\n" 1191 #if( CONFIG_DEBUG_KERNEL_INIT & 1 ) 1192 printk("\n\n***** memory fooprint for main kernel objects\n\n" 1174 1193 " - thread descriptor : %d bytes\n" 1175 1194 " - process descriptor : %d bytes\n" -
trunk/kernel/kern/printk.c
r428 r437 2 2 * printk.c - Kernel Log & debug messages API implementation. 3 3 * 4 * authors Alain Greiner (2016 )4 * authors Alain Greiner (2016,2017,2018) 5 5 * 6 6 * Copyright (c) UPMC Sorbonne Universites -
trunk/kernel/kern/printk.h
r428 r437 2 2 * printk.h - Kernel Log & debug messages API definition. 3 3 * 4 * authors Alain Greiner (2016 )4 * authors Alain Greiner (2016,2017,2018) 5 5 * 6 6 * Copyright (c) UPMC Sorbonne Universites … … 120 120 121 121 122 /////////////////////////////////////////////////////////////////////////////////// 123 // Conditional debug macros 124 /////////////////////////////////////////////////////////////////////////////////// 122 123 /* deprecated march 2018 [AG] 125 124 126 125 #if CONFIG_CHDEV_DEBUG … … 364 363 #endif 365 364 365 */ 366 366 367 367 #endif // _PRINTK_H -
trunk/kernel/kern/process.c
r436 r437 366 366 xptr_t children_lock_xp; 367 367 368 pid_t pid = process->pid; 369 368 370 assert( (process->th_nr == 0) , __FUNCTION__ , 369 "process %x in cluster %x has still active threads", p rocess->pid , local_cxy );371 "process %x in cluster %x has still active threads", pid , local_cxy ); 370 372 371 373 #if CONFIG_DEBUG_PROCESS_DESTROY … … 373 375 if( CONFIG_DEBUG_PROCESS_DESTROY ) 374 376 printk("\n[DBG] %s : thread %x enter to destroy process %x (pid = %x) / cycle %d\n", 375 __FUNCTION__ , CURRENT_THREAD , process, process->pid , cycle ); 377 __FUNCTION__ , CURRENT_THREAD , process, pid , cycle ); 378 #endif 379 380 #if CONFIG_DEBUG_PROCESS_DESTROY 381 if( CONFIG_DEBUG_PROCESS_DESTROY & 1 ) 382 cluster_processes_display( CXY_FROM_PID( pid ) ); 376 383 #endif 377 384 … … 383 390 384 391 // remove process from children_list if process is in owner cluster 385 if( CXY_FROM_PID( p rocess->pid ) == local_cxy )392 if( CXY_FROM_PID( pid ) == local_cxy ) 386 393 { 387 394 // get pointers on parent process … … 400 407 401 408 // release the process PID to cluster manager 402 cluster_pid_release( p rocess->pid );409 cluster_pid_release( pid ); 403 410 404 411 // FIXME close all open files and update dirty [AG] … … 419 426 if( CONFIG_DEBUG_PROCESS_DESTROY ) 420 427 printk("\n[DBG] %s : thread %x exit / destroyed process %x (pid = %x) / cycle %d\n", 421 __FUNCTION__ , CURRENT_THREAD , process, p rocess->pid, cycle );428 __FUNCTION__ , CURRENT_THREAD , process, pid, cycle ); 422 429 #endif 423 430 -
trunk/kernel/kern/rpc.c
r436 r437 1 1 /* 2 * rpc.c - RPC relatedoperations implementation.2 * rpc.c - RPC operations implementation. 3 3 * 4 * Author Alain Greiner (2016,2017 )4 * Author Alain Greiner (2016,2017,2018) 5 5 * 6 6 * Copyright (c) UPMC Sorbonne Universites … … 52 52 if( cycle > CONFIG_DEBUG_RPC_MARSHALING ) \ 53 53 printk("\n[DBG] %s : enter thread %x on core[%x,%d] / cycle %d\n", \ 54 __FUNCTION__ , CURRENT_THREAD ->trdid, local_cxy, CURRENT_THREAD->core->lid , cycle );54 __FUNCTION__ , CURRENT_THREAD , local_cxy, CURRENT_THREAD->core->lid , cycle ); 55 55 56 56 #define RPC_DEBUG_EXIT \ … … 58 58 if( cycle > CONFIG_DEBUG_RPC_MARSHALING ) \ 59 59 printk("\n[DBG] %s : exit thread %x on core[%x,%d] / cycle %d\n", \ 60 __FUNCTION__ , CURRENT_THREAD ->trdid, local_cxy, CURRENT_THREAD->core->lid , cycle );60 __FUNCTION__ , CURRENT_THREAD , local_cxy, CURRENT_THREAD->core->lid , cycle ); 61 61 62 62 #else … … 129 129 uint32_t cycle = (uint32_t)hal_get_cycles(); 130 130 if( CONFIG_DEBUG_RPC_SEND < cycle ) 131 printk("\n[DBG] %s : thread %x enter for rpc[%d] / rpc_ptr %x / cycle %d\n",132 __FUNCTION__, CURRENT_THREAD, rpc->index, rpc, cycle );131 printk("\n[DBG] %s : thread %x in cluster %x enter for rpc[%d] / rpc_ptr %x / cycle %d\n", 132 __FUNCTION__, CURRENT_THREAD, local_cxy, rpc->index, rpc, cycle ); 133 133 #endif 134 134 … … 174 174 cycle = (uint32_t)hal_get_cycles(); 175 175 if( CONFIG_DEBUG_RPC_SEND < cycle ) 176 printk("\n[DBG] %s : thread %x busy waiting / rpc[%d] / server = %x/ cycle %d\n",177 __FUNCTION__, CURRENT_THREAD, rpc->index , server_cxy, cycle );176 printk("\n[DBG] %s : thread %x in cluster %x busy waiting / rpc[%d] / cycle %d\n", 177 __FUNCTION__, CURRENT_THREAD, local_cxy, rpc->index , cycle ); 178 178 #endif 179 179 … … 183 183 cycle = (uint32_t)hal_get_cycles(); 184 184 if( CONFIG_DEBUG_RPC_SEND < cycle ) 185 printk("\n[DBG] %s : thread % resume / rpc[%d] / cycle %d\n",186 __FUNCTION__, CURRENT_THREAD, rpc->index, cycle );185 printk("\n[DBG] %s : thread % in cluster %x resume / rpc[%d] / cycle %d\n", 186 __FUNCTION__, CURRENT_THREAD, local_cxy, rpc->index, cycle ); 187 187 #endif 188 188 } … … 193 193 cycle = (uint32_t)hal_get_cycles(); 194 194 if( CONFIG_DEBUG_RPC_SEND < cycle ) 195 printk("\n[DBG] %s : thread %x block & deschedule / rpc[%d] / server = %x/ cycle %d\n",196 __FUNCTION__, CURRENT_THREAD, rpc->index , server_cxy, cycle );195 printk("\n[DBG] %s : thread %x in cluster %x deschedule / rpc[%d] / cycle %d\n", 196 __FUNCTION__, CURRENT_THREAD, local_cxy, rpc->index , cycle ); 197 197 #endif 198 198 thread_block( XPTR( local_cxy , this ) , THREAD_BLOCKED_RPC ); … … 202 202 cycle = (uint32_t)hal_get_cycles(); 203 203 if( CONFIG_DEBUG_RPC_SEND < cycle ) 204 printk("\n[DBG] %s : thread % resume / rpcr[%d] / cycle %d\n",205 __FUNCTION__, CURRENT_THREAD, rpc->index, cycle );204 printk("\n[DBG] %s : thread % in cluster %x resume / rpcr[%d] / cycle %d\n", 205 __FUNCTION__, CURRENT_THREAD, local_cxy, rpc->index, cycle ); 206 206 #endif 207 207 } … … 219 219 cycle = (uint32_t)hal_get_cycles(); 220 220 if( CONFIG_DEBUG_RPC_SEND < cycle ) 221 printk("\n[DBG] %s : non blocking rpc[%d] => thread return / cycle %d\n",221 printk("\n[DBG] %s : non blocking rpc[%d] => thread %x return / cycle %d\n", 222 222 __FUNCTION__, rpc->index, CURRENT_THREAD, cycle ); 223 223 #endif … … 355 355 uint32_t cycle = (uint32_t)hal_get_cycles(); 356 356 if( CONFIG_DEBUG_RPC_SERVER < cycle ) 357 printk("\n[DBG] %s : RPC thread %x takes RPC fifo ownership / cluster %x/ cycle %d\n",357 printk("\n[DBG] %s : RPC thread %x in cluster %x takes RPC fifo ownership / cycle %d\n", 358 358 __FUNCTION__, this, local_cxy, cycle ); 359 359 #endif … … 378 378 desc_ptr = GET_PTR( desc_xp ); 379 379 380 index = desc_ptr->index;381 blocking = desc_ptr->blocking;380 index = hal_remote_lw( XPTR( desc_cxy , &desc_ptr->index ) ); 381 blocking = hal_remote_lw( XPTR( desc_cxy , &desc_ptr->blocking ) ); 382 382 383 383 #if CONFIG_DEBUG_RPC_SERVER 384 384 cycle = (uint32_t)hal_get_cycles(); 385 385 if( CONFIG_DEBUG_RPC_SERVER < cycle ) 386 printk("\n[DBG] %s : RPC thread %x got rpc[%d] / rpc_ptr %x / cycle %d\n",387 __FUNCTION__, this, index, desc_ptr, cycle );386 printk("\n[DBG] %s : RPC thread %x in cluster %x got rpc[%d] / rpc_ptr %x / cycle %d\n", 387 __FUNCTION__, this, local_cxy, index, desc_ptr, cycle ); 388 388 #endif 389 389 // call the relevant server function … … 393 393 cycle = (uint32_t)hal_get_cycles(); 394 394 if( CONFIG_DEBUG_RPC_SERVER < cycle ) 395 printk("\n[DBG] %s : RPC thread %x completes rpc %d in cluster %x / cycle %d\n",396 __FUNCTION__, this, index, local_cxy, cycle );395 printk("\n[DBG] %s : RPC thread %x in cluster %x completes rpc[%d] / rpc_ptr %x / cycle %d\n", 396 __FUNCTION__, this, local_cxy, index, cycle ); 397 397 #endif 398 398 // increment handled RPCs counter … … 435 435 uint32_t cycle = (uint32_t)hal_get_cycles(); 436 436 if( CONFIG_DEBUG_RPC_SERVER < cycle ) 437 printk("\n[DBG] %s : RPC thread %x suicides in cluster %x/ cycle %d\n",437 printk("\n[DBG] %s : RPC thread %x in cluster %x suicides / cycle %d\n", 438 438 __FUNCTION__, this, local_cxy, cycle ); 439 439 #endif … … 450 450 uint32_t cycle = (uint32_t)hal_get_cycles(); 451 451 if( CONFIG_DEBUG_RPC_SERVER < cycle ) 452 printk("\n[DBG] %s : RPC thread %x deschedules in cluster %x/ cycle %d\n",452 printk("\n[DBG] %s : RPC thread %x in cluster %x deschedules / cycle %d\n", 453 453 __FUNCTION__, this, local_cxy, cycle ); 454 454 #endif … … 460 460 cycle = (uint32_t)hal_get_cycles(); 461 461 if( CONFIG_DEBUG_RPC_SERVER < cycle ) 462 printk("\n[DBG] %s : RPC thread %x resumes in cluster %x/ cycle %d\n",462 printk("\n[DBG] %s : RPC thread %x in cluster %x resumes / cycle %d\n", 463 463 __FUNCTION__, this, local_cxy, cycle ); 464 464 #endif … … 478 478 page_t ** page ) // out 479 479 { 480 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",481 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,482 CURRENT_THREAD->core->lid , hal_time_stamp() );483 480 484 481 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); … … 499 496 *page = (page_t *)(intptr_t)rpc.args[1]; 500 497 501 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",502 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,503 CURRENT_THREAD->core->lid , hal_time_stamp() );504 498 } 505 499 … … 507 501 void rpc_pmem_get_pages_server( xptr_t xp ) 508 502 { 509 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",510 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,511 CURRENT_THREAD->core->lid , hal_time_stamp() );512 503 513 504 // get client cluster identifier and pointer on RPC descriptor … … 524 515 hal_remote_swd( XPTR( cxy , &desc->args[1] ) , (uint64_t)(intptr_t)page ); 525 516 526 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",527 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,528 CURRENT_THREAD->core->lid , hal_time_stamp() );529 517 } 530 518 … … 537 525 page_t * page ) // out 538 526 { 539 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",540 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,541 CURRENT_THREAD->core->lid , hal_time_stamp() );542 527 543 528 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); … … 555 540 rpc_send( cxy , &rpc ); 556 541 557 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",558 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,559 CURRENT_THREAD->core->lid , hal_time_stamp() );560 542 } 561 543 … … 563 545 void rpc_pmem_release_pages_server( xptr_t xp ) 564 546 { 565 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",566 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,567 CURRENT_THREAD->core->lid , hal_time_stamp() );568 547 569 548 // get client cluster identifier and pointer on RPC descriptor … … 580 559 kmem_free( &req ); 581 560 582 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",583 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,584 CURRENT_THREAD->core->lid , hal_time_stamp() );585 561 } 586 562 … … 601 577 error_t * error ) // out 602 578 { 603 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",604 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,605 CURRENT_THREAD->core->lid , hal_time_stamp() );606 607 579 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); 608 580 … … 625 597 *error = (error_t)rpc.args[4]; 626 598 627 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",628 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,629 CURRENT_THREAD->core->lid , hal_time_stamp() );630 599 } 631 600 … … 633 602 void rpc_process_make_fork_server( xptr_t xp ) 634 603 { 635 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",636 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,637 CURRENT_THREAD->core->lid , hal_time_stamp() );638 604 639 605 xptr_t ref_process_xp; // extended pointer on reference parent process … … 662 628 hal_remote_swd( XPTR( client_cxy , &desc->args[4] ) , (uint64_t)error ); 663 629 664 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",665 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,666 CURRENT_THREAD->core->lid , hal_time_stamp() );667 630 } 668 631 … … 688 651 error_t * error ) // out 689 652 { 690 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",691 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,692 CURRENT_THREAD->core->lid , hal_time_stamp() );693 694 653 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); 695 654 … … 713 672 *error = (error_t)rpc.args[5]; 714 673 715 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",716 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,717 CURRENT_THREAD->core->lid , hal_time_stamp() );718 674 } 719 675 … … 721 677 void rpc_thread_user_create_server( xptr_t xp ) 722 678 { 723 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",724 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,725 CURRENT_THREAD->core->lid , hal_time_stamp() );726 679 727 680 pthread_attr_t * attr_ptr; // pointer on attributes structure in client cluster … … 764 717 hal_remote_swd( XPTR( client_cxy , &desc->args[5] ) , (uint64_t)error ); 765 718 766 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",767 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,768 CURRENT_THREAD->core->lid , hal_time_stamp() );769 719 } 770 720 … … 781 731 error_t * error ) // out 782 732 { 783 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",784 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,785 CURRENT_THREAD->core->lid , hal_time_stamp() );786 787 733 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); 788 734 … … 805 751 *error = (error_t)rpc.args[4]; 806 752 807 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",808 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,809 CURRENT_THREAD->core->lid , hal_time_stamp() );810 753 } 811 754 … … 813 756 void rpc_thread_kernel_create_server( xptr_t xp ) 814 757 { 815 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",816 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,817 CURRENT_THREAD->core->lid , hal_time_stamp() );818 819 758 thread_t * thread_ptr; // local pointer on thread descriptor 820 759 xptr_t thread_xp; // extended pointer on thread descriptor … … 842 781 hal_remote_swd( XPTR( client_cxy , &desc->args[2] ) , (uint64_t)thread_xp ); 843 782 844 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",845 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,846 CURRENT_THREAD->core->lid , hal_time_stamp() );847 783 } 848 784 … … 962 898 error_t * error ) // out 963 899 { 964 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",965 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,966 CURRENT_THREAD->core->lid , hal_time_stamp() );967 968 900 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); 969 901 … … 991 923 *error = (error_t)rpc.args[9]; 992 924 993 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",994 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,995 CURRENT_THREAD->core->lid , hal_time_stamp() );996 925 } 997 926 … … 1010 939 error_t error; 1011 940 1012 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",1013 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1014 CURRENT_THREAD->core->lid , hal_time_stamp() );1015 1016 941 // get client cluster identifier and pointer on RPC descriptor 1017 942 cxy_t client_cxy = GET_CXY( xp ); … … 1043 968 hal_remote_swd( XPTR( client_cxy , &desc->args[9] ) , (uint64_t)error ); 1044 969 1045 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",1046 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1047 CURRENT_THREAD->core->lid , hal_time_stamp() );1048 970 } 1049 971 … … 1056 978 struct vfs_inode_s * inode ) 1057 979 { 1058 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",1059 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1060 CURRENT_THREAD->core->lid , hal_time_stamp() );1061 1062 980 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); 1063 981 … … 1074 992 rpc_send( cxy , &rpc ); 1075 993 1076 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",1077 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1078 CURRENT_THREAD->core->lid , hal_time_stamp() );1079 994 } 1080 995 … … 1083 998 { 1084 999 vfs_inode_t * inode; 1085 1086 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",1087 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1088 CURRENT_THREAD->core->lid , hal_time_stamp() );1089 1000 1090 1001 // get client cluster identifier and pointer on RPC descriptor … … 1098 1009 vfs_inode_destroy( inode ); 1099 1010 1100 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",1101 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1102 CURRENT_THREAD->core->lid , hal_time_stamp() );1103 1011 } 1104 1012 … … 1115 1023 error_t * error ) // out 1116 1024 { 1117 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n", 1118 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1119 CURRENT_THREAD->core->lid , hal_time_stamp() ); 1025 RPC_DEBUG_ENTER 1120 1026 1121 1027 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); … … 1139 1045 *error = (error_t)rpc.args[4]; 1140 1046 1141 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 1142 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1143 CURRENT_THREAD->core->lid , hal_time_stamp() ); 1047 RPC_DEBUG_EXIT 1144 1048 } 1145 1049 … … 1153 1057 error_t error; 1154 1058 1059 RPC_DEBUG_ENTER 1060 1155 1061 char name_copy[CONFIG_VFS_MAX_NAME_LENGTH]; 1156 1157 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",1158 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1159 CURRENT_THREAD->core->lid , hal_time_stamp() );1160 1062 1161 1063 // get client cluster identifier and pointer on RPC descriptor … … 1181 1083 hal_remote_swd( XPTR( client_cxy , &desc->args[4] ) , (uint64_t)error ); 1182 1084 1183 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 1184 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 1185 CURRENT_THREAD->core->lid , hal_time_stamp() ); 1085 RPC_DEBUG_EXIT 1186 1086 } 1187 1087 … … 1195 1095 vfs_dentry_t * dentry ) 1196 1096 { 1197 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",1198 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1199 CURRENT_THREAD->core->lid , hal_time_stamp() );1200 1201 1097 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); 1202 1098 … … 1213 1109 rpc_send( cxy , &rpc ); 1214 1110 1215 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",1216 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1217 CURRENT_THREAD->core->lid , hal_time_stamp() );1218 1111 } 1219 1112 … … 1222 1115 { 1223 1116 vfs_dentry_t * dentry; 1224 1225 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",1226 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1227 CURRENT_THREAD->core->lid , hal_time_stamp() );1228 1117 1229 1118 // get client cluster identifier and pointer on RPC descriptor … … 1237 1126 vfs_dentry_destroy( dentry ); 1238 1127 1239 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",1240 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1241 CURRENT_THREAD->core->lid , hal_time_stamp() );1242 1128 } 1243 1129 … … 1254 1140 error_t * error ) // out 1255 1141 { 1256 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",1257 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1258 CURRENT_THREAD->core->lid , hal_time_stamp() );1259 1260 1142 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); 1261 1143 … … 1277 1159 *error = (error_t)rpc.args[3]; 1278 1160 1279 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",1280 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1281 CURRENT_THREAD->core->lid , hal_time_stamp() );1282 1161 } 1283 1162 … … 1289 1168 xptr_t file_xp; 1290 1169 error_t error; 1291 1292 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",1293 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1294 CURRENT_THREAD->core->lid , hal_time_stamp() );1295 1170 1296 1171 // get client cluster identifier and pointer on RPC descriptor … … 1311 1186 hal_remote_swd( XPTR( client_cxy , &desc->args[3] ) , (uint64_t)error ); 1312 1187 1313 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",1314 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1315 CURRENT_THREAD->core->lid , hal_time_stamp() );1316 1188 } 1317 1189 … … 1324 1196 vfs_file_t * file ) 1325 1197 { 1326 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",1327 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1328 CURRENT_THREAD->core->lid , hal_time_stamp() );1329 1330 1198 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); 1331 1199 … … 1342 1210 rpc_send( cxy , &rpc ); 1343 1211 1344 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",1345 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1346 CURRENT_THREAD->core->lid , hal_time_stamp() );1347 1212 } 1348 1213 … … 1351 1216 { 1352 1217 vfs_file_t * file; 1353 1354 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",1355 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1356 CURRENT_THREAD->core->lid , hal_time_stamp() );1357 1218 1358 1219 // get client cluster identifier and pointer on RPC descriptor … … 1366 1227 vfs_file_destroy( file ); 1367 1228 1368 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",1369 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1370 CURRENT_THREAD->core->lid , hal_time_stamp() );1371 1229 } 1372 1230 … … 1382 1240 error_t * error ) // out 1383 1241 { 1384 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",1385 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1386 CURRENT_THREAD->core->lid , hal_time_stamp() );1387 1388 1242 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); 1389 1243 … … 1405 1259 *error = (error_t)rpc.args[3]; 1406 1260 1407 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",1408 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1409 CURRENT_THREAD->core->lid , hal_time_stamp() );1410 1261 } 1411 1262 … … 1420 1271 char name_copy[CONFIG_VFS_MAX_NAME_LENGTH]; 1421 1272 1422 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",1423 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1424 CURRENT_THREAD->core->lid , hal_time_stamp() );1425 1426 1273 // get client cluster identifier and pointer on RPC descriptor 1427 1274 cxy_t client_cxy = GET_CXY( xp ); … … 1443 1290 hal_remote_swd( XPTR( client_cxy , &desc->args[3] ) , (uint64_t)error ); 1444 1291 1445 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",1446 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1447 CURRENT_THREAD->core->lid , hal_time_stamp() );1448 1292 } 1449 1293 … … 1457 1301 error_t * error ) // out 1458 1302 { 1459 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",1460 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1461 CURRENT_THREAD->core->lid , hal_time_stamp() );1462 1463 1303 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); 1464 1304 … … 1478 1318 *error = (error_t)rpc.args[1]; 1479 1319 1480 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",1481 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1482 CURRENT_THREAD->core->lid , hal_time_stamp() );1483 1320 } 1484 1321 … … 1489 1326 vfs_inode_t * inode; 1490 1327 1491 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",1492 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1493 CURRENT_THREAD->core->lid , hal_time_stamp() );1494 1495 1328 // get client cluster identifier and pointer on RPC descriptor 1496 1329 cxy_t client_cxy = GET_CXY( xp ); … … 1506 1339 hal_remote_swd( XPTR( client_cxy , &desc->args[1] ) , (uint64_t)error ); 1507 1340 1508 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",1509 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1510 CURRENT_THREAD->core->lid , hal_time_stamp() );1511 1341 } 1512 1342 … … 1523 1353 error_t * error ) // out 1524 1354 { 1525 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",1526 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1527 CURRENT_THREAD->core->lid , hal_time_stamp() );1528 1529 1355 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); 1530 1356 … … 1547 1373 *error = (error_t)rpc.args[4]; 1548 1374 1549 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",1550 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1551 CURRENT_THREAD->core->lid , hal_time_stamp() );1552 1375 } 1553 1376 … … 1561 1384 error_t error; 1562 1385 1563 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",1564 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1565 CURRENT_THREAD->core->lid , hal_time_stamp() );1566 1567 1386 // get client cluster identifier and pointer on RPC descriptor 1568 1387 cxy_t client_cxy = GET_CXY( xp ); … … 1581 1400 hal_remote_swd( XPTR( client_cxy , &desc->args[4] ) , (uint64_t)error ); 1582 1401 1583 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",1584 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1585 CURRENT_THREAD->core->lid , hal_time_stamp() );1586 1402 } 1587 1403 … … 1597 1413 error_t * error ) // out 1598 1414 { 1599 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",1600 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1601 CURRENT_THREAD->core->lid , hal_time_stamp() );1602 1603 1415 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); 1604 1416 … … 1620 1432 *error = (error_t)rpc.args[3]; 1621 1433 1622 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",1623 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1624 CURRENT_THREAD->core->lid , hal_time_stamp() );1625 1434 } 1626 1435 … … 1633 1442 xptr_t vseg_xp; 1634 1443 error_t error; 1635 1636 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",1637 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1638 CURRENT_THREAD->core->lid , hal_time_stamp() );1639 1444 1640 1445 // get client cluster identifier and pointer on RPC descriptor … … 1654 1459 hal_remote_swd( XPTR( client_cxy , &desc->args[3] ) , (uint64_t)error ); 1655 1460 1656 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",1657 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1658 CURRENT_THREAD->core->lid , hal_time_stamp() );1659 1461 } 1660 1462 … … 1673 1475 error_t * error ) // out 1674 1476 { 1675 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",1676 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1677 CURRENT_THREAD->core->lid , hal_time_stamp() );1678 1679 1477 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); 1680 1478 … … 1698 1496 *error = (error_t)rpc.args[5]; 1699 1497 1700 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",1701 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1702 CURRENT_THREAD->core->lid , hal_time_stamp() );1703 1498 } 1704 1499 … … 1712 1507 ppn_t ppn; 1713 1508 error_t error; 1714 1715 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",1716 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1717 CURRENT_THREAD->core->lid , hal_time_stamp() );1718 1509 1719 1510 // get client cluster identifier and pointer on RPC descriptor … … 1734 1525 hal_remote_swd( XPTR( client_cxy , &desc->args[5] ) , (uint64_t)error ); 1735 1526 1736 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",1737 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1738 CURRENT_THREAD->core->lid , hal_time_stamp() );1739 1527 } 1740 1528 … … 1748 1536 xptr_t * buf_xp ) // out 1749 1537 { 1750 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",1751 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1752 CURRENT_THREAD->core->lid , hal_time_stamp() );1753 1754 1538 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); 1755 1539 … … 1769 1553 *buf_xp = (xptr_t)rpc.args[1]; 1770 1554 1771 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",1772 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1773 CURRENT_THREAD->core->lid , hal_time_stamp() );1774 1555 } 1775 1556 … … 1777 1558 void rpc_kcm_alloc_server( xptr_t xp ) 1778 1559 { 1779 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",1780 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1781 CURRENT_THREAD->core->lid , hal_time_stamp() );1782 1783 1560 // get client cluster identifier and pointer on RPC descriptor 1784 1561 cxy_t client_cxy = GET_CXY( xp ); … … 1798 1575 hal_remote_swd( XPTR( client_cxy , &desc->args[1] ) , (uint64_t)buf_xp ); 1799 1576 1800 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",1801 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1802 CURRENT_THREAD->core->lid , hal_time_stamp() );1803 1577 } 1804 1578 … … 1812 1586 uint32_t kmem_type ) // in 1813 1587 { 1814 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",1815 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1816 CURRENT_THREAD->core->lid , hal_time_stamp() );1817 1818 1588 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); 1819 1589 … … 1831 1601 rpc_send( cxy , &rpc ); 1832 1602 1833 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",1834 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1835 CURRENT_THREAD->core->lid , hal_time_stamp() );1836 1603 } 1837 1604 … … 1839 1606 void rpc_kcm_free_server( xptr_t xp ) 1840 1607 { 1841 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",1842 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1843 CURRENT_THREAD->core->lid , hal_time_stamp() );1844 1845 1608 // get client cluster identifier and pointer on RPC descriptor 1846 1609 cxy_t client_cxy = GET_CXY( xp ); … … 1857 1620 kmem_free( &req ); 1858 1621 1859 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",1860 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1861 CURRENT_THREAD->core->lid , hal_time_stamp() );1862 1622 } 1863 1623 … … 1876 1636 error_t * error ) // out 1877 1637 { 1878 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",1879 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1880 CURRENT_THREAD->core->lid , hal_time_stamp() );1881 1882 1638 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); 1883 1639 … … 1902 1658 *error = (error_t)rpc.args[6]; 1903 1659 1904 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",1905 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1906 CURRENT_THREAD->core->lid , hal_time_stamp() );1907 1660 } 1908 1661 … … 1918 1671 uint32_t size; 1919 1672 error_t error; 1920 1921 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",1922 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1923 CURRENT_THREAD->core->lid , hal_time_stamp() );1924 1673 1925 1674 // get client cluster identifier and pointer on RPC descriptor … … 1959 1708 hal_remote_swd( XPTR( client_cxy , &desc->args[6] ) , (uint64_t)error ); 1960 1709 1961 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",1962 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1963 CURRENT_THREAD->core->lid , hal_time_stamp() );1964 1710 } 1965 1711 … … 1974 1720 page_t ** page ) // out 1975 1721 { 1976 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",1977 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,1978 CURRENT_THREAD->core->lid , hal_time_stamp() );1979 1980 1722 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); 1981 1723 … … 1996 1738 *page = (page_t *)(intptr_t)rpc.args[2]; 1997 1739 1998 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",1999 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,2000 CURRENT_THREAD->core->lid , hal_time_stamp() );2001 1740 } 2002 1741 … … 2004 1743 void rpc_mapper_get_page_server( xptr_t xp ) 2005 1744 { 2006 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",2007 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,2008 CURRENT_THREAD->core->lid , hal_time_stamp() );2009 2010 1745 // get client cluster identifier and pointer on RPC descriptor 2011 1746 cxy_t cxy = GET_CXY( xp ); … … 2022 1757 hal_remote_swd( XPTR( cxy , &desc->args[1] ) , (uint64_t)(intptr_t)page ); 2023 1758 2024 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",2025 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,2026 CURRENT_THREAD->core->lid , hal_time_stamp() );2027 1759 } 2028 1760 … … 2043 1775 struct vseg_s ** vseg ) 2044 1776 { 2045 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",2046 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,2047 CURRENT_THREAD->core->lid , hal_time_stamp() );2048 2049 1777 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); 2050 1778 … … 2071 1799 *vseg = (vseg_t *)(intptr_t)rpc.args[8]; 2072 1800 2073 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",2074 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,2075 CURRENT_THREAD->core->lid , hal_time_stamp() );2076 1801 } 2077 1802 … … 2079 1804 void rpc_vmm_create_vseg_server( xptr_t xp ) 2080 1805 { 2081 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",2082 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,2083 CURRENT_THREAD->core->lid , hal_time_stamp() );2084 2085 1806 // get client cluster identifier and pointer on RPC descriptor 2086 1807 cxy_t cxy = GET_CXY( xp ); … … 2110 1831 hal_remote_swd( XPTR( cxy , &desc->args[8] ) , (uint64_t)(intptr_t)vseg ); 2111 1832 2112 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",2113 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,2114 CURRENT_THREAD->core->lid , hal_time_stamp() );2115 1833 } 2116 1834 … … 2123 1841 lid_t lid) 2124 1842 { 2125 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",2126 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,2127 CURRENT_THREAD->core->lid , hal_time_stamp() );2128 2129 1843 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); 2130 1844 … … 2141 1855 rpc_send( cxy , &rpc ); 2142 1856 2143 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",2144 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,2145 CURRENT_THREAD->core->lid , hal_time_stamp() );2146 1857 } 2147 1858 … … 2149 1860 void rpc_sched_display_server( xptr_t xp ) 2150 1861 { 2151 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",2152 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,2153 CURRENT_THREAD->core->lid , hal_time_stamp() );2154 2155 1862 // get client cluster identifier and pointer on RPC descriptor 2156 1863 cxy_t cxy = GET_CXY( xp ); … … 2163 1870 sched_display( lid ); 2164 1871 2165 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",2166 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,2167 CURRENT_THREAD->core->lid , hal_time_stamp() );2168 1872 } 2169 1873 … … 2176 1880 process_t * process ) 2177 1881 { 2178 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",2179 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,2180 CURRENT_THREAD->core->lid , hal_time_stamp() );2181 2182 1882 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); 2183 1883 … … 2194 1894 rpc_send( cxy , &rpc ); 2195 1895 2196 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",2197 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,2198 CURRENT_THREAD->core->lid , hal_time_stamp() );2199 1896 } 2200 1897 … … 2202 1899 void rpc_vmm_set_cow_server( xptr_t xp ) 2203 1900 { 2204 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",2205 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,2206 CURRENT_THREAD->core->lid , hal_time_stamp() );2207 2208 1901 process_t * process; 2209 1902 … … 2218 1911 vmm_set_cow( process ); 2219 1912 2220 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",2221 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,2222 CURRENT_THREAD->core->lid , hal_time_stamp() );2223 1913 } 2224 1914 … … 2232 1922 bool_t detailed ) 2233 1923 { 2234 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",2235 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,2236 CURRENT_THREAD->core->lid , hal_time_stamp() );2237 2238 1924 assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n"); 2239 1925 … … 2251 1937 rpc_send( cxy , &rpc ); 2252 1938 2253 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n",2254 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,2255 CURRENT_THREAD->core->lid , hal_time_stamp() );2256 1939 } 2257 1940 … … 2259 1942 void rpc_vmm_display_server( xptr_t xp ) 2260 1943 { 2261 rpc_dmsg("\n[DBG] %s : enter / thread %x on core[%x,%d] / cycle %d\n",2262 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,2263 CURRENT_THREAD->core->lid , hal_time_stamp() );2264 2265 1944 process_t * process; 2266 1945 bool_t detailed; … … 2277 1956 vmm_display( process , detailed ); 2278 1957 2279 rpc_dmsg("\n[DBG] %s : exit / thread %x on core[%x,%d] / cycle %d\n", 2280 __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 2281 CURRENT_THREAD->core->lid , hal_time_stamp() ); 2282 } 2283 2284 1958 } 1959 1960 -
trunk/kernel/kern/rpc.h
r436 r437 2 2 * rpc.h - RPC (Remote Procedure Call) operations definition. 3 3 * 4 * Author Alain Greiner (2016,2017 )4 * Author Alain Greiner (2016,2017,2018) 5 5 * 6 6 * Copyright (c) UPMC Sorbonne Universites -
trunk/kernel/kern/scheduler.c
r436 r437 97 97 list_entry_t * current; 98 98 list_entry_t * last; 99 list_entry_t * root; 100 bool_t done; 99 101 100 102 // take lock protecting sheduler lists 101 103 spinlock_lock( &sched->lock ); 102 104 103 // first loop: scan the kernel threads list if not empty105 // first : scan the kernel threads list if not empty 104 106 if( list_is_empty( &sched->k_root ) == false ) 105 107 { 108 root = &sched->k_root; 106 109 last = sched->k_last; 107 current = sched->k_last; 108 do 110 current = last; 111 done = false; 112 113 while( done == false ) 109 114 { 110 115 // get next entry in kernel list 111 current = list_next( &sched->k_root , current ); 116 current = current->next; 117 118 // check exit condition 119 if( current == last ) done = true; 112 120 113 121 // skip the root that does not contain a thread 114 if( current == NULL ) current = sched->k_root.next;122 if( current == root ) continue; 115 123 116 124 // get thread pointer for this entry … … 120 128 switch( thread->type ) 121 129 { 122 case THREAD_IDLE: // skip IDLE thread 123 break; 124 125 case THREAD_RPC: // RPC thread if non blocked and FIFO non-empty 130 case THREAD_RPC: // if non blocked and RPC FIFO non-empty 126 131 if( (thread->blocked == 0) && 127 132 (local_fifo_is_empty( &LOCAL_CLUSTER->rpc_fifo ) == 0) ) … … 132 137 break; 133 138 134 default: // DEV threadif non blocked and waiting queue non empty139 case THREAD_DEV: // if non blocked and waiting queue non empty 135 140 if( (thread->blocked == 0) && 136 141 (xlist_is_empty( XPTR( local_cxy , &thread->chdev->wait_root)) == 0) ) … … 140 145 } 141 146 break; 142 } // end switch type 143 } 144 while( current != last ); 145 } 146 147 // second loop : scan the user threads list if not empty 147 148 default: 149 break; 150 } 151 } // end loop on kernel threads 152 } // end if kernel threads 153 154 // second : scan the user threads list if not empty 148 155 if( list_is_empty( &sched->u_root ) == false ) 149 156 { 157 root = &sched->u_root; 150 158 last = sched->u_last; 151 current = sched->u_last; 152 do 159 current = last; 160 done = false; 161 162 while( done == false ) 153 163 { 154 164 // get next entry in user list 155 current = list_next( &sched->u_root , current ); 165 current = current->next; 166 167 // check exit condition 168 if( current == last ) done = true; 156 169 157 170 // skip the root that does not contain a thread 158 if( current == NULL ) current = sched->u_root.next;171 if( current == root ) continue; 159 172 160 173 // get thread pointer for this entry … … 167 180 return thread; 168 181 } 169 } 170 while( current != last ); 171 } 172 173 // third : return idle thread if no runnable thread 182 } // end loop on user threads 183 } // end if user threads 184 185 // third : return idle thread if no other runnable thread 174 186 spinlock_unlock( &sched->lock ); 175 187 return sched->idle; … … 180 192 void sched_handle_signals( core_t * core ) 181 193 { 194 182 195 list_entry_t * iter; 183 196 thread_t * thread; … … 214 227 process = thread->process; 215 228 229 #if CONFIG_DEBUG_SCHED_HANDLE_SIGNALS 230 uint32_t cycle = (uint32_t)hal_get_cycles(); 231 if( CONFIG_DEBUG_SCHED_HANDLE_SIGNALS < cycle ) 232 printk("\n[DBG] %s : thread %x in proces %x must be deleted / cycle %d\n", 233 __FUNCTION__ , thread , process->pid , cycle ); 234 #endif 216 235 // release FPU if required 217 236 if( thread->core->fpu_owner == thread ) thread->core->fpu_owner = NULL; … … 232 251 233 252 #if CONFIG_DEBUG_SCHED_HANDLE_SIGNALS 234 uint32_tcycle = (uint32_t)hal_get_cycles();253 cycle = (uint32_t)hal_get_cycles(); 235 254 if( CONFIG_DEBUG_SCHED_HANDLE_SIGNALS < cycle ) 236 printk("\n[DBG] %s : thread %x deleted thread %x/ cycle %d\n",237 __FUNCTION__ , CURRENT_THREAD , thread , cycle );255 printk("\n[DBG] %s : thread %x in process %x has been deleted / cycle %d\n", 256 __FUNCTION__ , thread , process->pid , cycle ); 238 257 #endif 239 258 // destroy process descriptor if no more threads … … 246 265 cycle = (uint32_t)hal_get_cycles(); 247 266 if( CONFIG_DEBUG_SCHED_HANDLE_SIGNALS < cycle ) 248 printk("\n[DBG] %s : thread %x deleted process %x/ cycle %d\n",249 __FUNCTION__ , CURRENT_THREAD , process, cycle );267 printk("\n[DBG] %s : process %x has been deleted / cycle %d\n", 268 __FUNCTION__ , process->pid , cycle ); 250 269 #endif 251 270 … … 374 393 remote_spinlock_lock_busy( lock_xp , &save_sr ); 375 394 376 nolock_printk("\n***** scheduler state for core[%x,%d] / cycle %d / current = (%x,%x)\n", 377 local_cxy , core->lid, (uint32_t)hal_get_cycles(), 378 sched->current->process->pid , sched->current->trdid ); 395 nolock_printk("\n***** threads on core[%x,%d] / current %x / cycle %d\n", 396 local_cxy , core->lid, sched->current, (uint32_t)hal_get_cycles() ); 379 397 380 398 // display kernel threads … … 390 408 else 391 409 { 392 nolock_printk(" - %s / pid %X / trdid %X / desc %X / block %X / flags %X 410 nolock_printk(" - %s / pid %X / trdid %X / desc %X / block %X / flags %X\n", 393 411 thread_type_str( thread->type ), thread->process->pid, thread->trdid, 394 thread, thread->blocked, thread->flags 412 thread, thread->blocked, thread->flags ); 395 413 } 396 414 } -
trunk/kernel/kern/scheduler.h
r436 r437 40 40 typedef struct scheduler_s 41 41 { 42 spinlock_t lock; /*! readlock protecting lists of threads*/42 spinlock_t lock; /*! lock protecting lists of threads */ 43 43 uint16_t u_threads_nr; /*! total number of attached user threads */ 44 44 uint16_t k_threads_nr; /*! total number of attached kernel threads */ -
trunk/kernel/kern/thread.h
r436 r437 150 150 xptr_t parent; /*! extended pointer on parent thread */ 151 151 152 uint32_t local_locks; /*! number of local locks owned by thread */153 uint32_t remote_locks; /*! number of remote locks owned by thread */154 155 152 remote_spinlock_t join_lock; /*! lock protecting the join/exit */ 156 153 xptr_t join_xp; /*! joining/killer thread extended pointer */ … … 197 194 list_entry_t locks_root; /*! root of list of locks taken */ 198 195 xlist_entry_t xlocks_root; /*! root of xlist of remote locks taken */ 196 uint32_t local_locks; /*! number of local locks owned by thread */ 197 uint32_t remote_locks; /*! number of remote locks owned by thread */ 199 198 200 199 thread_info_t info; /*! embedded thread_info_t */
Note: See TracChangeset
for help on using the changeset viewer.