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/mm/mapper.h

    r628 r635  
    6464 * TODO (1) the mapper being only used to implement the VFS cache(s), the mapper.c
    6565 *          and mapper.h file should be trandfered to the fs directory.
    66  * TODO (2) the "type" field is probably unused...
     66 * TODO (2) the "type" field in mapper descriptor is redundant and probably unused.
    6767 ******************************************************************************************/
    6868
     
    106106
    107107/*******************************************************************************************
    108  * This function load from device a missing page identified by the <page_id> argument
    109  * into the mapper identified by the <mapper> local pointer.
    110  * It allocates a physical page from the local cluster, initialise by accessing device,
    111  * and register the page in the mapper radix tree.
    112  * It must be executed by a thread running in the cluster containing the mapper.
     108 * This function load from the IOC device a missing page identified by the <page_id>
     109 * argument into a - possibly remote - mapper identified by the <mapper_xp> argument.
     110 * It can be executed by a thread running in any cluster.
     111 * It allocates a physical page from the remote cluster PPM, initialises it by accessing
     112 * the IOC device, and registers the page in the remote mapper radix tree.
    113113 * WARNING : the calling function mapper_remote_get_page() is supposed to take and release
    114114 * the lock protecting the mapper in WRITE_MODE.
    115115 *******************************************************************************************
    116  * @ mapper      : [in]  target mapper.
    117  * @ page_id : [in]  missing page index in file.
    118  * @ page_xp : [out] buffer for extended pointer on missing page descriptor.
    119  * @ return 0 if success / return -1 if a dirty page cannot be updated on device.
    120  ******************************************************************************************/
    121 error_t mapper_handle_miss( mapper_t * mapper,
    122                             uint32_t   page_id,
    123                             xptr_t   * page_xp );
     116 * @ mapper_xp   : [in]  extended pointer on remote mapper.
     117 * @ page_id     : [in]  missing page index in file.
     118 * @ page_xp     : [out] buffer for extended pointer on missing page descriptor.
     119 * @ return 0 if success / return -1 if IOC cannot be accessed.
     120 ******************************************************************************************/
     121error_t mapper_remote_handle_miss( xptr_t     mapper_xp,
     122                                   uint32_t   page_id,
     123                                   xptr_t   * page_xp );
     124
     125/*******************************************************************************************
     126 * This function removes a physical page from a - possibly remote - mapper,
     127 * and releases the page to the remote PPM.
     128 * It can be executed by any thread running in any cluster.
     129 * It takes the mapper lock in WRITE_MODE to update the mapper.
     130 *******************************************************************************************
     131 * @ mapper     : extended pointer on the remote mapper.
     132 * @ page       : local pointer on the page in remote mapper.
     133 ******************************************************************************************/
     134void mapper_remote_release_page( xptr_t          mapper_xp,
     135                                 struct page_s * page );
    124136
    125137/*******************************************************************************************
     
    170182
    171183/*******************************************************************************************
    172  * This function removes a physical page from the mapper, and releases
    173  * the page to the local PPM. It is called by the mapper_destroy() function.
    174  * It must be executed by a thread running in the cluster containing the mapper.
    175  * It takes the mapper lock in WRITE_MODE to update the mapper.
    176  *******************************************************************************************
    177  * @ mapper     : local pointer on the mapper.
    178  * @ page       : pointer on page to remove.
    179  ******************************************************************************************/
    180 void mapper_release_page( mapper_t      * mapper,
    181                           struct page_s * page );
    182 
    183 /*******************************************************************************************
    184184 * This function returns an extended pointer on a page descriptor.
    185185 * The - possibly remote - mapper is identified by the <mapper_xp> argument.
     
    237237/*******************************************************************************************
    238238 * This function scan all pages present in the mapper identified by the <mapper> argument,
    239  * and synchronize all pages maked as dirty" on disk.
     239 * and synchronize all pages marked as "dirty" on disk.
    240240 * These pages are unmarked and removed from the local PPM dirty_list.
    241241 * This function must be called by a local thread running in same cluster as the mapper.
Note: See TracChangeset for help on using the changeset viewer.