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/syscalls/sys_exec.c

    r626 r635  
    6363    uint32_t     length;      // string length
    6464    kmem_req_t   req;         // kmem request
    65     page_t     * page;        // page descriptor
    66     xptr_t       base_xp;     // extended pointer on page base
    6765    uint32_t     order;       // ln2( number of pages to store strings )
    6866    char      ** k_pointers;  // base of kernel array of pointers
     67    char       * k_buf_base;  // base address of the kernel strings buffer
    6968    char       * k_buf_ptr;   // pointer on first empty slot in kernel strings buffer
    70     char       * k_buf_base;  // base address of the kernel strings buffer
    7169
    7270    // compute ln2( number of pages for kernel strings buffer )
     
    7472    else          order = bits_log2( CONFIG_VMM_ENVS_SIZE );
    7573
    76     req.type   = KMEM_PAGE;
     74    // allocate one physical page for kernel array of pointers
     75    req.type   = KMEM_PPM;
     76    req.order  = 0;
    7777    req.flags  = AF_KERNEL | AF_ZERO;
    78 
    79     // allocate one physical page for kernel array of pointers
    80     req.type   = 0;
    81     page       = kmem_alloc( &req );
    82 
    83     if( page == NULL ) return ENOMEM;
    84 
    85     base_xp = ppm_page2base( XPTR( local_cxy , page ) );
    86     k_pointers = (char **)GET_PTR( base_xp );
     78    k_pointers = kmem_alloc( &req );
     79
     80    if( k_pointers == NULL ) return ENOMEM;
    8781
    8882    // allocate several physical pages to store the strings themselve
    89     req.type   = order;
    90     page       = kmem_alloc( &req );
    91 
    92     if( page == NULL ) return ENOMEM;
    93 
    94     base_xp = ppm_page2base( XPTR( local_cxy , page ) );
    95     k_buf_base = (char *)GET_PTR( base_xp );
     83    req.type   = KMEM_PPM;
     84    req.order  = order;
     85    req.flags  = AF_KERNEL | AF_ZERO;
     86    k_buf_base = kmem_alloc( &req );
     87
     88    if( k_buf_base == NULL ) return ENOMEM;
    9689
    9790    // copy the array of pointers to kernel buffer
Note: See TracChangeset for help on using the changeset viewer.