Changeset 641 for trunk/kernel/libk


Ignore:
Timestamp:
Oct 10, 2019, 1:42:04 PM (5 years ago)
Author:
alain
Message:
  • Fix several bugs.
  • Introduce the "stat" command in KSH.

This almos-mkh version sucessfully executed the FFT application
(65536 complex points) on the TSAR architecture from 1 to 64 cores.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/libk/user_dir.c

    r640 r641  
    145145    }
    146146
    147     // Build an initialize the dirent array as a list of pages.
     147    // Build and initialize the dirent array as a list of pages.
    148148    // For each iteration in this while loop:
    149149    // - allocate one physical 4 Kbytes (64 dirent slots)
     
    174174        }
    175175
    176         // call the relevant FS specific function to copy up to 64 dirents in page
     176        // call the relevant FS specific function to copy dirents in page
    177177        error = vfs_fs_get_user_dir( inode,
    178178                                     base,
     
    210210#endif
    211211
    212     // compute required vseg size for a 64 bytes dirent
     212    // compute required vseg size
    213213    vseg_size = total_dirents << 6;
    214214
     
    254254// check vseg size
    255255assert( (total_pages == hal_remote_l32( XPTR( ref_cxy , &vseg->vpn_size ) ) ),
    256 "unconsistent vseg size for dirent array" );
     256"unconsistent vseg size for dirent array " );
    257257
    258258    // build extended pointer on reference process GPT
     
    294294
    295295            // delete the vseg
    296             if( ref_cxy == local_cxy)  vmm_remove_vseg( ref_ptr, vseg );
    297             else                       rpc_vmm_remove_vseg_client( ref_cxy, ref_ptr, vseg );
     296            intptr_t base = (intptr_t)hal_remote_lpt( XPTR( ref_cxy , &vseg->min ) );
     297            rpc_vmm_remove_vseg_client( ref_cxy, ref_pid, base );
    298298         
    299299            // release the user_dir descriptor
     
    434434    // to wait all RPC responses, and will be unblocked by the last RPC server thread.
    435435    // It allocates a - shared - RPC descriptor in the stack,  because all parallel
    436     // server threads use the same input arguments, and the same response field.
     436    // server threads use the same input arguments, and there is no out argument.
    437437
    438438    // get owner cluster identifier and process lpid
     
    454454
    455455    // initialize a shared RPC descriptor
    456     // can be shared, because no out arguments
    457456    rpc.rsp       = &responses;
    458     rpc.blocking  = false;
     457    rpc.blocking  = false;                  // non blocking behaviour for rpc_send()
    459458    rpc.index     = RPC_VMM_REMOVE_VSEG;
    460459    rpc.thread    = this;
     
    476475        hal_atomic_add( &responses , 1 );
    477476
     477#if (DEBUG_USER_DIR & 1)
     478uint32_t cycle = (uint32_t)hal_get_cycles();
     479if( cycle > DEBUG_USER_DIR )
     480printk("\n[%s] thread[%x,%x] register RPC request in cluster %x\n",
     481__FUNCTION__, this->process->pid, this->trdid, process_cxy );
     482#endif
     483
    478484        // send RPC to target cluster 
    479485        rpc_send( process_cxy , &rpc );
Note: See TracChangeset for help on using the changeset viewer.