Changeset 19 for trunk/kernel/kern/dqdt.h
- Timestamp:
- Jun 3, 2017, 4:46:59 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/kern/dqdt.h
r14 r19 1 1 /* 2 2 * kern/dqdt.h - Distributed Quad Decision Tree 3 * 3 * 4 4 * Author : Alain Greiner (2016) 5 5 * … … 35 35 * - If X_SIZE or Y_SIZE are equal to 1, it makes the assumption that the cluster 36 36 * topology is a one dimensionnal vector, an build the smallest one-dimensionnal 37 * quad-tree covering this one-dimensionnal vector. If the number of clusters 37 * quad-tree covering this one-dimensionnal vector. If the number of clusters 38 38 * is not a power of 4, the tree is truncated as required. 39 39 * TODO : the mapping for the one dimensionnal topology is not implemented yet [AG]. 40 * 41 * - If both Y_SIZE and Y_SIZE are larger than 1, it makes the assumption that 42 * the cluster topology is a 2D mesh. The [X,Y] coordinates of a cluster are 43 * obtained from the CXY identifier using the following rules : 40 * 41 * - If both Y_SIZE and Y_SIZE are larger than 1, it makes the assumption that 42 * the cluster topology is a 2D mesh. The [X,Y] coordinates of a cluster are 43 * obtained from the CXY identifier using the following rules : 44 44 * X = CXY >> Y_WIDTH / Y = CXY & ((1<<Y_WIDTH)-1) 45 * If the mesh X_SIZE and Y_SIZE dimensions are not equal, or are not power of 2, 45 * If the mesh X_SIZE and Y_SIZE dimensions are not equal, or are not power of 2, 46 46 * we build the smallest two dimensionnal quad-tree covering all clusters, 47 47 * and this tree is truncated as required. 48 48 * The root node is always implemented in cluster [0,0] 49 49 * The mesh size is supposed to contain at most 32 * 32 clusters. 50 * There are at most 6 DQDT nodes in a cluster 50 * There are at most 6 DQDT nodes in a cluster 51 51 * . Level 0 nodes exist on all clusters and have no children. 52 * . Level 1 nodes exist when both X and Y coordinates are multiple of 2 52 * . Level 1 nodes exist when both X and Y coordinates are multiple of 2 53 53 * . Level 2 nodes exist when both X and Y coordinates are multiple of 4 54 54 * . Level 3 nodes exist when both X and Y coordinates are multiple of 8 … … 76 76 77 77 /**************************************************************************************** 78 * This local function initializes the local DQDT structures. 78 * This local function initializes the local DQDT structures. 79 79 * The information describing the hardware platform topology and the cluster 80 80 * indexing policy is defined by the three arguments below. 81 * This initialisation is done in parallel, locally in each cluster, because the DQDT 81 * This initialisation is done in parallel, locally in each cluster, because the DQDT 82 82 * is allocated as a global variable in the cluster_manager, and the local addresses 83 83 * are identical in all clusters. … … 118 118 * This local function updates both the total number of threads, 119 119 * in the level 0 DQDT node, and the variation of the number of threads 120 * for future propagation to the DQDT upper levels. 120 * for future propagation to the DQDT upper levels. 121 121 * It should be called on each thread creation or destruction. 122 122 **************************************************************************************** … … 128 128 * This local function updates both the total number of allocated pages, 129 129 * in the level 0 DQDT node, and the variation of the number of pages 130 * for future propagation to the DQDT upper levels. 130 * for future propagation to the DQDT upper levels. 131 131 * It should be called on each memory allocation or release. 132 132 **************************************************************************************** … … 146 146 /**************************************************************************************** 147 147 * This function can be called in any cluster. It traverses the DQDT tree 148 * from the root to the bottom, to analyse the memory load and select the cluster 148 * from the root to the bottom, to analyse the memory load and select the cluster 149 149 * with the lowest memory load for dynamic memory allocation with no locality constraint. 150 150 ****************************************************************************************
Note: See TracChangeset
for help on using the changeset viewer.