Changeset 632 for trunk/kernel/mm/page.h


Ignore:
Timestamp:
May 28, 2019, 2:56:04 PM (5 years ago)
Author:
alain
Message:

This version replace the RPC by direct remote memory access
for physical pages allacation/release.
It is commited before being tested.

File:
1 edited

Legend:

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

    r625 r632  
    33 *
    44 * Authors Ghassan Almalles (2008,2009,2010,2011,2012)
    5  *         Alain Greiner    (2016)
     5 *         Alain Greiner    (2016,2017,2018,2019)
    66 *
    77 * Copyright (c) UPMC Sorbonne Universites
     
    6868
    6969/*************************************************************************************
    70  * This function initializes one page descriptor.
     70 * This function must be called by a thread running in the local cluster.
     71 * It initializes the page descriptor.
    7172 *************************************************************************************
    7273 * @ page    : pointer to page descriptor
     
    7576
    7677/*************************************************************************************
    77  * This function atomically set one or several flags in page descriptor flags.
     78 * This function must be called by a thread running in the local cluster.
     79 * It atomically set one or several flags in page descriptor flags.
    7880 *************************************************************************************
    7981 * @ page    : pointer to page descriptor.
     
    8486
    8587/*************************************************************************************
    86  * This function atomically reset one or several flags in page descriptor flags.
     88 * This function must be called by a thread running in the local cluster.
     89 * It atomically reset one or several flags in page descriptor flags.
    8790 *************************************************************************************
    8891 * @ page    : pointer to page descriptor.
     
    9396
    9497/*************************************************************************************
    95  * This function tests the value of one or several flags in page descriptor flags.
     98 * This function must be called by a thread running in the local cluster.
     99 * It tests the value of one or several flags in page descriptor flags.
    96100 *************************************************************************************
    97101 * @ page    : pointer to page descriptor.
     
    103107
    104108/*************************************************************************************
    105  * This function resets to 0 all bytes in a given page.
     109 * This function must be called by a thread running in the local cluster.
     110 * It resets to 0 all bytes in a given page.
    106111 *************************************************************************************
    107112 * @ page     : pointer on page descriptor.
     
    110115
    111116/*************************************************************************************
    112  * This blocking function atomically increments the page refcount.
     117 * This function must be called by a thread running in the local cluster.
     118 * It atomically increments the page refcount.
    113119 *************************************************************************************
    114120 * @ page     : pointer on page descriptor.
     
    117123
    118124/*************************************************************************************
    119  * This blocking function atomically decrements the page refcount.
     125 * This function must be called by a thread running in the local cluster.
     126 * It atomically decrements the page refcount.
    120127 *************************************************************************************
    121128 * @ page     : pointer on page descriptor.
     
    123130inline void page_refcount_down( page_t * page );
    124131
    125 /*************************************************************************************
    126  * This function display the values contained in a page descriptor.
    127  *************************************************************************************
    128  * @ page     : pointer on page descriptor.
    129  ************************************************************************************/
    130 void page_print( page_t * page );
    131132
    132133
     134
     135/*************************************************************************************
     136 * This function can be called by any thread running in any cluster.
     137 * It atomically set one or several flags in a remote page descriptor
     138 * identified by the <page_xp> argument.
     139 *************************************************************************************
     140 * @ page_xp : extended pointer to page descriptor.
     141 * @ value   : all non zero bits in value will be set.
     142 ************************************************************************************/
     143inline void page_remote_set_flag( xptr_t    page_xp,
     144                                  uint32_t  value );
     145
     146/*************************************************************************************
     147 * This function can be called by any thread running in any cluster.
     148 * It atomically reset one or several flags in a remote page descriptor
     149 * identified by the <page_xp> argument.
     150 *************************************************************************************
     151 * @ page_xp : extended pointer to page descriptor.
     152 * @ value   : all non zero bits in value will be cleared.
     153 ************************************************************************************/
     154inline void page_remote_clear_flag( xptr_t    page_xp,
     155                                    uint32_t  value );
     156
     157/*************************************************************************************
     158 * This function can be called by any thread running in any cluster.
     159 * It tests the value of one or several flags in a remote page descriptor
     160 * identified by the <page_xp> argument.
     161 *************************************************************************************
     162 * @ page_xp : extended pointer to page descriptor.
     163 * @ value   : all non zero bits will be tested.
     164 * @ returns true if at least one non zero bit in value is set / false otherwise.
     165 ************************************************************************************/
     166inline bool_t page_remote_is_flag( xptr_t    page_xp,
     167                                   uint32_t  value );
     168
     169/*************************************************************************************
     170 * This function can be called by any thread running in any cluster.
     171 * It atomically increments the refcount for the remote page identified by
     172 * the <page_xp> argument.
     173 *************************************************************************************
     174 * @ page_xp   : extended pointer on page descriptor.
     175 ************************************************************************************/
     176inline void page_remote_refcount_up( xptr_t page_xp );
     177
     178/*************************************************************************************
     179 * This function can be called by any thread running in any cluster.
     180 * It atomically decrements the refcount for the remote page identified by
     181 * the <page_xp> argument.
     182 *************************************************************************************
     183 * @ page_xp   : extended pointer on page descriptor.
     184 ************************************************************************************/
     185inline void page_remote_refcount_down( xptr_t  page_xp );
     186
     187/*************************************************************************************
     188 * This debug function can be called by any thread running in any cluster.
     189 * It displays the values contained in a page descriptor.
     190 *************************************************************************************
     191 * @ page_xp     : extended pointer on page descriptor.
     192 ************************************************************************************/
     193void page_remote_display( xptr_t  page_xp );
     194
    133195#endif  /* _PAGE_H_ */
Note: See TracChangeset for help on using the changeset viewer.