Ignore:
Timestamp:
Jun 26, 2019, 11:42:37 AM (3 years ago)
Author:
alain
Message:

This version is a major evolution: The physical memory allocators,
defined in the kmem.c, ppm.c, and kcm.c files have been modified
to support remote accesses. The RPCs that were previously user
to allocate physical memory in a remote cluster have been removed.
This has been done to cure a dead-lock in case of concurrent page-faults.

This version 2.2 has been tested on a (4 clusters / 2 cores per cluster)
TSAR architecture, for both the "sort" and the "fft" applications.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/syscalls/sys_fork.c

    r625 r635  
    7272
    7373#if DEBUG_SYS_FORK
    74 if( DEBUG_SYS_FORK < tm_start )
     74if( DEBUG_SYS_FORK < (uint32_t)tm_start )
    7575printk("\n[%s] thread[%x,%x] enter / cycle =  %d\n",
    7676__FUNCTION__, parent_pid, parent_thread_ptr->trdid, (uint32_t)tm_start );
     
    109109
    110110#if (DEBUG_SYS_FORK & 1 )
    111 if( DEBUG_SYS_FORK < tm_start )
     111if( DEBUG_SYS_FORK < (uint32_t)tm_start )
    112112printk("\n[%s] thread[%x,%x] selected cluster %x\n",
    113113__FUNCTION__, parent_pid, parent_thread_ptr->trdid, child_cxy );
     
    150150        }
    151151
    152     // set remote child CPU context from parent_thread register values
     152    // set the remote child CPU context from parent register values,
     153    // set the remote child uzone from
    153154    // replicates the parent thread kernel stack to the child thread descriptor,
    154155    // and finally unblock the child thread.
     
    171172
    172173#if DEBUG_SYS_FORK
    173 if( DEBUG_SYS_FORK < tm_end )
     174if( DEBUG_SYS_FORK < (uint32_t)tm_end )
    174175printk("\n[%s] parent thread[%x,%x] exit / child_pid %x / cycle %d\n",
    175176__FUNCTION__, current->process->pid, current->trdid, child_pid, (uint32_t)tm_end );
    176177#endif
    177178
    178 // only parent contribute to instrumentation
     179// only parent display the parent and child VMM
     180#if (DEBUG_SYS_FORK & 1 )
     181if( DEBUG_SYS_FORK < (uint32_t)tm_end )
     182{
     183    process_t * child_process_ptr = hal_remote_lpt( XPTR( child_cxy ,
     184                                                          &child_thread_ptr->process ) );
     185    xptr_t      child_process_xp  = XPTR( child_cxy , child_process_ptr );
     186
     187    hal_vmm_display( ref_process_xp , true );
     188    hal_vmm_display( child_process_xp , true );
     189}
     190#endif
     191
     192// only parent contribute to syscalls instrumentation
    179193#if CONFIG_INSTRUMENTATION_SYSCALLS
    180194hal_atomic_add( &syscalls_cumul_cost[SYS_FORK] , tm_end - tm_start );
     
    187201
    188202#if DEBUG_SYS_FORK
    189 if( DEBUG_SYS_FORK < tm_end )
     203if( DEBUG_SYS_FORK < (uint32_t)tm_end )
    190204printk("\n[%s] child thread[%x,%x] exit / child_pid %x / cycle %d\n",
    191205__FUNCTION__, current->process->pid, current->trdid, child_pid, (uint32_t)tm_end );
Note: See TracChangeset for help on using the changeset viewer.