Changeset 629 for trunk/kernel/kern
- Timestamp:
- May 17, 2019, 9:27:04 AM (6 years ago)
- Location:
- trunk/kernel/kern
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/kern/kernel_init.c
r628 r629 171 171 "VFS_FILE", // 33 172 172 "VMM_VSL", // 34 173 "VMM_GPT", // 35 174 "VFS_MAIN", // 36 175 "FATFS_FAT", // 37 173 "VFS_MAIN", // 35 174 "FATFS_FAT", // 36 176 175 }; 177 176 -
trunk/kernel/kern/process.c
r626 r629 166 166 #endif 167 167 168 // initialize GPT and VSL locks 169 remote_rwlock_init( XPTR( local_cxy , &vmm->gpt_lock ) , LOCK_VMM_GPT ); 168 // initialize VSL locks 170 169 remote_rwlock_init( XPTR( local_cxy , &vmm->vsl_lock ) , LOCK_VMM_VSL ); 171 170 … … 426 425 427 426 // initialize GPT and VSL locks 428 remote_rwlock_init( XPTR( local_cxy , &vmm->gpt_lock ) , LOCK_VMM_GPT );429 427 remote_rwlock_init( XPTR( local_cxy , &vmm->vsl_lock ) , LOCK_VMM_VSL ); 430 428 … … 1482 1480 1483 1481 // set COW flag in DATA, ANON, REMOTE vsegs for parent process VMM 1484 // this includes all par net process copies in all clusters1482 // this includes all parent process copies in all clusters 1485 1483 if( parent_process_cxy == local_cxy ) // reference is local 1486 1484 { … … 1707 1705 1708 1706 // initialize VSL and GPT locks 1709 remote_rwlock_init( XPTR( local_cxy , &vmm->vsl_lock ) , LOCK_VMM_VSL ); 1710 remote_rwlock_init( XPTR( local_cxy , &vmm->gpt_lock ) , LOCK_VMM_GPT ); 1707 remote_rwlock_init( XPTR( local_cxy , &vmm->vsl_lock ) , LOCK_VMM_VSL ); 1711 1708 1712 1709 // create kernel vsegs in GPT and VSL, as required by the hardware architecture -
trunk/kernel/kern/rpc.c
r628 r629 104 104 "VFS_FILE_CREATE", // 14 105 105 "VFS_FILE_DESTROY", // 15 106 "VFS_FS_ GET_DENTRY", // 16106 "VFS_FS_NEW_DENTRY", // 16 107 107 "VFS_FS_ADD_DENTRY", // 17 108 108 "VFS_FS_REMOVE_DENTRY", // 18 -
trunk/kernel/kern/scheduler.c
r625 r629 63 63 // @ returns pointer on selected thread descriptor 64 64 //////////////////////////////////////////////////////////////////////////////////////////// 65 thread_t * sched_select( scheduler_t * sched )65 static thread_t * sched_select( scheduler_t * sched ) 66 66 { 67 67 thread_t * thread; … … 248 248 uint32_t cycle = (uint32_t)hal_get_cycles(); 249 249 if( DEBUG_SCHED_HANDLE_SIGNALS < cycle ) 250 printk("\n[%s] thread[%x,%x] on core[%x,%d] deleted / %d threads/ cycle %d\n",250 printk("\n[%s] thread[%x,%x] on core[%x,%d] deleted (still %d threads) / cycle %d\n", 251 251 __FUNCTION__, process->pid, thread->trdid, local_cxy, thread->core->lid, count, cycle ); 252 #endif 253 254 #if CONFIG_INSTRUMENTATION_PGFAULTS 255 uint32_t local_nr = thread->info.local_pgfault_nr; 256 uint32_t local_cost = (local_nr == 0) ? 0 : (thread->info.local_pgfault_cost / local_nr); 257 uint32_t global_nr = thread->info.global_pgfault_nr; 258 uint32_t global_cost = (global_nr == 0) ? 0 : (thread->info.global_pgfault_cost / global_nr); 259 uint32_t false_nr = thread->info.false_pgfault_nr; 260 uint32_t false_cost = (false_nr == 0) ? 0 : (thread->info.false_pgfault_cost / false_nr); 261 printk("***** page faults for thread[%x,%x]\n" 262 " - %d local : %d cycles\n" 263 " - %d global : %d cycles\n" 264 " - %d false : %d cycles\n", 265 process->pid, thread->trdid, 266 local_nr, local_cost, 267 global_nr, global_cost, 268 false_nr, false_cost ); 252 269 #endif 253 270 // destroy process descriptor if last thread … … 481 498 482 499 #if (DEBUG_SCHED_YIELD & 0x1) 483 // if( sched->trace ) 484 if( (uint32_t)hal_get_cycles() > DEBUG_SCHED_YIELD ) 500 if( sched->trace ) 485 501 sched_display( lid ); 486 502 #endif … … 535 551 536 552 #if DEBUG_SCHED_YIELD 537 // if( sched->trace ) 538 if( (uint32_t)hal_get_cycles() > DEBUG_SCHED_YIELD ) 553 if( sched->trace ) 539 554 printk("\n[%s] core[%x,%d] / cause = %s\n" 540 555 " thread %x (%s) (%x,%x) => thread %x (%s) (%x,%x) / cycle %d\n", … … 553 568 554 569 #if (DEBUG_SCHED_YIELD & 1) 555 // if( sched->trace ) 556 if( (uint32_t)hal_get_cycles() > DEBUG_SCHED_YIELD ) 570 if( sched->trace ) 557 571 printk("\n[%s] core[%x,%d] / cause = %s\n" 558 572 " thread %x (%s) (%x,%x) continue / cycle %d\n", -
trunk/kernel/kern/thread.c
r625 r629 907 907 908 908 // update target process instrumentation counter 909 process->vmm.pgfault_nr += thread->info.pgfault_nr;909 // process->vmm.pgfault_nr += thread->info.pgfault_nr; 910 910 911 911 // remove thread from process th_tbl[] -
trunk/kernel/kern/thread.h
r625 r629 100 100 typedef struct thread_info_s 101 101 { 102 uint32_t pgfault_nr; /*! cumulated number of page fault */ 103 cycle_t last_cycle; /*! last cycle counter value (date) */ 104 cycle_t usr_cycles; /*! user execution duration (cycles) */ 105 cycle_t sys_cycles; /*! system execution duration (cycles) */ 102 uint32_t false_pgfault_nr; /*! number of local page fault */ 103 uint32_t false_pgfault_cost; /*! cumulated cost */ 104 uint32_t local_pgfault_nr; /*! number of local page fault */ 105 uint32_t local_pgfault_cost; /*! cumulated cost */ 106 uint32_t global_pgfault_nr; /*! number of global page fault */ 107 uint32_t global_pgfault_cost; /*! cumulated cost */ 108 109 cycle_t last_cycle; /*! last cycle counter value (date) */ 110 cycle_t usr_cycles; /*! user execution duration (cycles) */ 111 cycle_t sys_cycles; /*! system execution duration (cycles) */ 106 112 } 107 113 thread_info_t;
Note: See TracChangeset
for help on using the changeset viewer.