Changes between Initial Version and Version 2 of Ticket #58
- Timestamp:
- Oct 31, 2010, 5:34:02 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #58 – Description
initial v2 8 8 * memory_allocator API 9 9 10 `mem_alloc` only takes a validity constraint, which is the access scope. Optimization scope is not in the API and is implicit. If region are activated, a `memory_allocator` is chosen depending on the scope and the current CPU. Hack was added to get a foreign scope context: mem_alloc_cpu, making an indirection through a CLS.10 `mem_alloc` only takes a reachability constraint, which is the access scope. Optimization scope is not in the API and is implicit. If region are activated, a `memory_allocator` is chosen depending on the scope and the current CPU. Hack was added to get a foreign scope context: mem_alloc_cpu, making an indirection through a CLS. 11 11 12 12 Here we see the scope serves two purposes: 13 * A validity constraint ("the allocated memory should be accessible from X")13 * A reachability constraint ("the allocated memory should be accessible from X") 14 14 * A proximity (optimization) constraint (implicit, or CLS-based) 15 15 This is broken … … 18 18 19 19 mem_alloc API should take two parameters: 20 * A validity constraint20 * A reachability constraint 21 21 * "The allocated memory *may* be accessed from X" 22 22 * A proxymity scope … … 32 32 * user tasks data 33 33 * (most variables) 34 * DMA: This is a su perset of SYS, telling devices should be able to DMA there34 * DMA: This is a subset of SYS, telling devices should be able to DMA there 35 35 * Not all memory map supports DMA 36 36 * Some processors reserve zones for DMA (with different cacheability) … … 62 62 size_t size, 63 63 void *priv, 64 enum mem_ validity_s valid,64 enum mem_reachability_s valid, 65 65 void **addr); 66 66 void *priv; 67 67 }; 68 68 69 enum mem_ validity_s69 enum mem_reachability_s 70 70 { 71 71 MEM_VALID_SYS, … … 78 78 size_t size, 79 79 struct mem_proximity_s *prox, 80 enum mem_ validity_s valid,80 enum mem_reachability_s valid, 81 81 void **addr); 82 82 … … 105 105 void **addr); 106 106 }}} 107