Ignore:
Timestamp:
Jun 3, 2017, 4:42:49 PM (7 years ago)
Author:
max@…
Message:

cosmetic, and a few typos

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/mm/mapper.h

    r1 r18  
    3838
    3939/*******************************************************************************************
    40  * The mapper implement the kernel cache for a given file or directory.
     40 * The mapper implements the kernel cache for a given file or directory.
    4141 * There is one mapper per file. It is implemented as a three levels radix tree,
    4242 * entirely stored in the same cluster as the inode representing the file/dir.
    43  * - The fast retrieval key is the page index in the file. 
     43 * - The fast retrieval key is the page index in the file.
    4444 *   The ix1_width, ix2_width, ix3_width sub-indexes are configuration parameters.
    4545 * - The leaves are pointers on physical page descriptors, dynamically allocated
     
    5252 *   used to move pages to or from the relevant file system on IOC device.
    5353 * - the mapper_move fragments() function is used to move data to or from a distributed
    54  *   user buffer. 
     54 *   user buffer.
    5555 * - The mapper_get_page() function that return a page descriptor pointer from a page
    5656 *   index in file is in charge of handling the miss on the mapper cache.
     
    8080 * and an user buffer, that can be split in several distributed physical pages located
    8181 * in different clusters. A fragment is a set of contiguous bytes in the file.
    82  * - It can be stored in one single physical page in the user buffer. 
     82 * - It can be stored in one single physical page in the user buffer.
    8383 * - It can spread two successive physical pages in the kernel mapper.
    8484 ******************************************************************************************/
     
    9494
    9595/*******************************************************************************************
    96  * This function allocates physical memory for a mapper descriptor, and inititalizes it
     96 * This function allocates physical memory for a mapper descriptor, and initializes it
    9797 * (refcount <= 0) / inode <= NULL).
    9898 * It must be executed by a thread running in the cluster containing the mapper.
     
    105105 * This function releases all physical pages allocated for the mapper.
    106106 * It synchronizes all dirty pages (i.e. update the file on disk) if required.
    107  * The mapper descriptor and the radix three themselve are released.
     107 * The mapper descriptor and the radix tree themselves are released.
    108108 * It must be executed by a thread running in the cluster containing the mapper.
    109109 *******************************************************************************************
     
    114114
    115115/*******************************************************************************************
    116  * This function moves all fragments covering a distributed user buffer between 
     116 * This function moves all fragments covering a distributed user buffer between
    117117 * a mapper (associated to a local inode), and the user buffer.
    118  * [See the fragment definition in the mapper.h file] 
     118 * [See the fragment definition in the mapper.h file]
    119119 * It must be executed by a thread running in the cluster containing the mapper.
    120120 * The lock protecting the mapper must have been taken in WRITE_MODE or READ_MODE
    121121 * by the caller thread, depending on the transfer direction.
    122122 * In case of write, the dirty bit is set for all pages written in the mapper.
    123  * The offset in the file descriptor is not modified by this function. 
     123 * The offset in the file descriptor is not modified by this function.
    124124 * Implementation note:
    125125 * For each fragment, this function makes ONE hal_remote_memcpy() when the fragment is
     
    155155
    156156/*******************************************************************************************
    157  * This function search a physical page descriptor from its index in mapper.
     157 * This function searches a physical page descriptor from its index in mapper.
    158158 * It must be executed by a thread running in the cluster containing the mapper.
    159159 * In case of miss, it takes the mapper lock in WRITE_MODE, load the missing
    160  * page from device to the mapper, and release the mapper lock. 
     160 * page from device to the mapper, and release the mapper lock.
    161161 *******************************************************************************************
    162162 * @ mapper     : local pointer on the mapper.
     
    174174 * @ mapper     : local pointer on the mapper.
    175175 * @ index      : page index in file.
    176  * @ page   : local pointer on the page descriptor in mapper. 
     176 * @ page   : local pointer on the page descriptor in mapper.
    177177 * @ returns 0 if success / return EINVAL if it cannot access the device.
    178178 ******************************************************************************************/
    179179error_t mapper_updt_page( mapper_t      * mapper,
    180180                          uint32_t        index,
    181                           struct page_s * page );       
    182              
     181                          struct page_s * page );
     182
    183183/*******************************************************************************************
    184184 * This function makes an I/0 operation to move one page from mapper to FS.
     
    191191 * @ mapper     : local pointer on the mapper.
    192192 * @ index      : page index in file.
    193  * @ page   : local pointer on the page descriptor in mapper. 
     193 * @ page   : local pointer on the page descriptor in mapper.
    194194 * @ returns 0 if success / return EINVAL if it cannot access the device.
    195195 ******************************************************************************************/
    196196error_t mapper_sync_page( mapper_t      * mapper,
    197197                          uint32_t        index,
    198                           struct page_s * page );       
     198                          struct page_s * page );
    199199
    200200#endif /* _MAPPER_H_ */
Note: See TracChangeset for help on using the changeset viewer.