Ignore:
Timestamp:
Jun 26, 2019, 11:42:37 AM (5 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/kern/scheduler.c

    r630 r635  
    180180    sched = &core->scheduler;
    181181
    182     ////////////////// scan user threads to handle both ACK and DELETE requests
     182    ////////////////// scan user threads to handle ACK and DELETE requests
    183183    root = &sched->u_root;
    184184    iter = root->next;
     
    195195        {
    196196
    197 // check thread blocked
     197// check target thread blocked
    198198assert( (thread->blocked & THREAD_BLOCKED_GLOBAL) , "thread not blocked" );
    199199 
     
    206206
    207207        // handle REQ_DELETE only if target thread != calling thread
    208         if( (thread->flags & THREAD_FLAG_REQ_DELETE) && (thread != CURRENT_THREAD) )
    209         {
     208        if( thread->flags & THREAD_FLAG_REQ_DELETE )
     209        {
     210
     211// check calling thread != target thread
     212assert( (thread != CURRENT_THREAD) , "calling thread cannot delete itself" );
     213 
    210214            // get thread process descriptor
    211215            process = thread->process;
     
    497501    remote_fifo_t * fifo    = &LOCAL_CLUSTER->rpc_fifo[lid];
    498502 
     503#if DEBUG_SCHED_YIELD
     504uint32_t cycle = (uint32_t)hal_get_cycles();
     505#endif
     506
    499507#if (DEBUG_SCHED_YIELD & 0x1)
    500 if( sched->trace )
     508if( sched->trace || (cycle > DEBUG_SCHED_YIELD) )
    501509sched_display( lid );
    502510#endif
     
    551559
    552560#if DEBUG_SCHED_YIELD
    553 if( sched->trace )
     561if( sched->trace || (cycle > DEBUG_SCHED_YIELD) )
    554562printk("\n[%s] core[%x,%d] / cause = %s\n"
    555563"      thread %x (%s) (%x,%x) => thread %x (%s) (%x,%x) / cycle %d\n",
    556564__FUNCTION__, local_cxy, lid, cause,
    557565current, thread_type_str(current->type), current->process->pid, current->trdid,next ,
    558 thread_type_str(next->type) , next->process->pid , next->trdid , (uint32_t)hal_get_cycles() );
     566thread_type_str(next->type) , next->process->pid , next->trdid , cycle );
    559567#endif
    560568
     
    567575        busylock_release( &sched->lock );
    568576
    569 #if (DEBUG_SCHED_YIELD & 1)
    570 if( sched->trace )
     577#if DEBUG_SCHED_YIELD
     578if( sched->trace || (cycle > DEBUG_SCHED_YIELD) )
    571579printk("\n[%s] core[%x,%d] / cause = %s\n"
    572580"      thread %x (%s) (%x,%x) continue / cycle %d\n",
Note: See TracChangeset for help on using the changeset viewer.