Ignore:
Timestamp:
Apr 4, 2018, 2:49:02 PM (7 years ago)
Author:
alain
Message:

Fix a bug in scheduler related to RPC blocking.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/kern/cluster.c

    r437 r438  
    8989        spinlock_init( &cluster->kcm_lock );
    9090
    91 #if CONFIG_DEBUG_CLUSTER_INIT
     91#if DEBUG_CLUSTER_INIT
    9292uint32_t cycle = (uint32_t)hal_get_cycles();
    93 if( CONFIG_DEBUG_CLUSTER_INIT < cycle )
     93if( DEBUG_CLUSTER_INIT < cycle )
    9494printk("\n[DBG] %s : thread %x enters for cluster %x / cycle %d\n",
    9595__FUNCTION__ , CURRENT_THREAD , local_cxy , cycle );
     
    9999    cluster->dqdt_root_level = dqdt_init( info->x_size,
    100100                                          info->y_size,
    101                                           info->y_width );
    102     cluster->threads_var = 0;
    103     cluster->pages_var   = 0;
     101                                          info->y_width ) - 1;
    104102
    105103    // initialises embedded PPM
     
    113111    }
    114112
    115 #if( CONFIG_DEBUG_CLUSTER_INIT & 1 )
     113#if( DEBUG_CLUSTER_INIT & 1 )
    116114cycle = (uint32_t)hal_get_cycles();
    117 if( CONFIG_DEBUG_CLUSTER_INIT < cycle )
     115if( DEBUG_CLUSTER_INIT < cycle )
    118116printk("\n[DBG] %s : PPM initialized in cluster %x / cycle %d\n",
    119117__FUNCTION__ , local_cxy , cycle );
     
    123121        khm_init( &cluster->khm );
    124122
    125 #if( CONFIG_DEBUG_CLUSTER_INIT & 1 )
     123#if( DEBUG_CLUSTER_INIT & 1 )
    126124uint32_t cycle = (uint32_t)hal_get_cycles();
    127 if( CONFIG_DEBUG_CLUSTER_INIT < cycle )
     125if( DEBUG_CLUSTER_INIT < cycle )
    128126printk("\n[DBG] %s : KHM initialized in cluster %x at cycle %d\n",
    129127__FUNCTION__ , local_cxy , hal_get_cycles() );
     
    133131        kcm_init( &cluster->kcm , KMEM_KCM );
    134132
    135 #if( CONFIG_DEBUG_CLUSTER_INIT & 1 )
     133#if( DEBUG_CLUSTER_INIT & 1 )
    136134uint32_t cycle = (uint32_t)hal_get_cycles();
    137 if( CONFIG_DEBUG_CLUSTER_INIT < cycle )
     135if( DEBUG_CLUSTER_INIT < cycle )
    138136printk("\n[DBG] %s : KCM initialized in cluster %x at cycle %d\n",
    139137__FUNCTION__ , local_cxy , hal_get_cycles() );
     
    148146        }
    149147
    150 #if( CONFIG_DEBUG_CLUSTER_INIT & 1 )
     148#if( DEBUG_CLUSTER_INIT & 1 )
    151149cycle = (uint32_t)hal_get_cycles();
    152 if( CONFIG_DEBUG_CLUSTER_INIT < cycle )
     150if( DEBUG_CLUSTER_INIT < cycle )
    153151printk("\n[DBG] %s : cores initialized in cluster %x / cycle %d\n",
    154152__FUNCTION__ , local_cxy , cycle );
     
    159157    cluster->rpc_threads = 0;
    160158
    161 #if( CONFIG_DEBUG_CLUSTER_INIT & 1 )
     159#if( DEBUG_CLUSTER_INIT & 1 )
    162160cycle = (uint32_t)hal_get_cycles();
    163 if( CONFIG_DEBUG_CLUSTER_INIT < cycle )
     161if( DEBUG_CLUSTER_INIT < cycle )
    164162printk("\n[DBG] %s : RPC fifo inialized in cluster %x at cycle %d\n",
    165163__FUNCTION__ , local_cxy , hal_get_cycles() );
     
    188186    }
    189187
    190 #if CONFIG_DEBUG_CLUSTER_INIT
     188#if DEBUG_CLUSTER_INIT
    191189cycle = (uint32_t)hal_get_cycles();
    192 if( CONFIG_DEBUG_CLUSTER_INIT < cycle )
     190if( DEBUG_CLUSTER_INIT < cycle )
    193191printk("\n[DBG] %s , thread %x exit for cluster %x / cycle %d\n",
    194192__FUNCTION__ , CURRENT_THREAD , local_cxy , cycle );
     
    456454    pmgr_t * pm = &LOCAL_CLUSTER->pmgr;
    457455
    458 #if CONFIG_DEBUG_CLUSTER_PROCESS_COPIES
     456#if DEBUG_CLUSTER_PROCESS_COPIES
    459457uint32_t cycle = (uint32_t)hal_get_cycles();
    460 if( CONFIG_DEBUG_CLUSTER_PROCESS_COPIES < cycle )
     458if( DEBUG_CLUSTER_PROCESS_COPIES < cycle )
    461459printk("\n[DBG] %s enters / cluster %x / process %x / cycle %d\n",
    462460__FUNCTION__ , local_cxy , process , cycle );
     
    487485    remote_spinlock_unlock_busy( copies_lock , irq_state );
    488486
    489 #if CONFIG_DEBUG_CLUSTER_PROCESS_COPIES
     487#if DEBUG_CLUSTER_PROCESS_COPIES
    490488cycle = (uint32_t)hal_get_cycles();
    491 if( CONFIG_DEBUG_CLUSTER_PROCESS_COPIES < cycle )
     489if( DEBUG_CLUSTER_PROCESS_COPIES < cycle )
    492490printk("\n[DBG] %s exit / cluster %x / process %x / cycle %d\n",
    493491__FUNCTION__ , local_cxy , process , cycle );
     
    502500    pmgr_t * pm = &LOCAL_CLUSTER->pmgr;
    503501
    504 #if CONFIG_DEBUG_CLUSTER_PROCESS_COPIES
     502#if DEBUG_CLUSTER_PROCESS_COPIES
    505503uint32_t cycle = (uint32_t)hal_get_cycles();
    506 if( CONFIG_DEBUG_CLUSTER_PROCESS_COPIES < cycle )
     504if( DEBUG_CLUSTER_PROCESS_COPIES < cycle )
    507505printk("\n[DBG] %s enters / cluster %x / process %x / cycle %d\n",
    508506__FUNCTION__ , local_cxy , process , cycle );
     
    530528    remote_spinlock_unlock_busy( copies_lock , irq_state );
    531529
    532 #if CONFIG_DEBUG_CLUSTER_PROCESS_COPIES
     530#if DEBUG_CLUSTER_PROCESS_COPIES
    533531cycle = (uint32_t)hal_get_cycles();
    534 if( CONFIG_DEBUG_CLUSTER_PROCESS_COPIES < cycle )
     532if( DEBUG_CLUSTER_PROCESS_COPIES < cycle )
    535533printk("\n[DBG] %s exit / cluster %x / process %x / cycle %d\n",
    536534__FUNCTION__ , local_cxy , process , cycle );
Note: See TracChangeset for help on using the changeset viewer.