@@ -153,7 +153,6 @@ typedef enum fu_caller_exclusivity_t {
153
153
* @retval "numa+x86_tpause" for the NUMA-aware pool with `tpause` instruction with "waitpkg" CPU feature.
154
154
* @retval "numa+arm64_wfet" for the NUMA-aware pool with `wfet` instruction on AArch64.
155
155
* @retval "numa+risc5_pause" for the NUMA-aware pool with `pause` instruction on RISC-V.
156
- * @note This API is @b not synchronized and should be called once during initialization.
157
156
*
158
157
* The string describes both the memory topology awareness and the CPU-specific optimizations
159
158
* available for busy-waiting. These capabilities directly affect performance characteristics:
@@ -167,7 +166,6 @@ char const *fu_capabilities_string(void);
167
166
* @brief Describes the number of logical CPU cores available on the system.
168
167
* @retval 0 if the thread pool is not supported on the current platform or detection failed.
169
168
* @retval 1-N where N is the number of logical cores detected by the OS.
170
- * @note This API is @b not synchronized and should be called once during initialization.
171
169
*
172
170
* On x86 systems with hyper-threading enabled, this will be 2x the number of physical cores.
173
171
* On ARM big.LITTLE architectures, this includes both performance and efficiency cores.
@@ -186,7 +184,6 @@ size_t fu_count_logical_cores(void);
186
184
* @retval 1 on most desktop, laptop, or IoT platforms with unified memory.
187
185
* @retval 2-8 on typical dual-socket servers or heterogeneous mobile chips.
188
186
* @retval 4-32 is a typical range on high-end cloud servers with multiple sockets.
189
- * @note This API is @b not synchronized and should be called once during initialization.
190
187
*
191
188
* A "colocation" represents a group of threads that share the same:
192
189
* - NUMA memory domain (fast local memory access)
@@ -205,7 +202,6 @@ size_t fu_count_colocations(void);
205
202
* @retval 1 on systems with uniform memory access (UMA).
206
203
* @retval 2-8 on typical multi-socket servers.
207
204
* @retval 8+ on high-end systems with complex topologies.
208
- * @note This API is @b not synchronized and should be called once during initialization.
209
205
*
210
206
* NUMA nodes represent distinct memory domains with different access latencies.
211
207
* Memory allocated on the local NUMA node is typically 2-3x faster to access
@@ -220,19 +216,36 @@ size_t fu_count_numa_nodes(void);
220
216
* @retval 0 if QoS detection is not supported.
221
217
* @retval 1 on systems with homogeneous cores.
222
218
* @retval 2-3 on systems with heterogeneous cores (e.g., ARM big.LITTLE, Intel P+E cores).
223
- * @note This API is @b not synchronized and should be called once during initialization.
224
219
*
225
220
* Different QoS levels may have vastly different performance characteristics.
226
221
* Consider creating separate thread pools for different workload types.
227
222
*/
228
223
size_t fu_count_quality_levels (void );
229
224
225
+ /**
226
+ * @brief Returns the total volume of any pages (huge or regular) available across all NUMA nodes.
227
+ * @retval Number of bytes of memory pages available across all NUMA nodes.
228
+ */
229
+ size_t fu_volume_any_pages (void );
230
+
231
+ /**
232
+ * @brief Returns the volume of any pages (huge or regular) available on the specified NUMA node.
233
+ * @param[in] numa_node_index The index of the NUMA node to query, in [0, numa_nodes_count).
234
+ * @retval 0 if the NUMA node index is invalid or if no memory is available.
235
+ * @retval Number of bytes of memory pages available on the specified NUMA node.
236
+ *
237
+ * This function queries the operating system for the total amount of memory pages
238
+ * (both huge pages and regular pages) available for allocation on the specified NUMA node.
239
+ * This is useful for determining how much memory can be allocated for vector storage
240
+ * based on a percentage of available memory.
241
+ */
242
+ size_t fu_volume_any_pages_in (size_t numa_node_index );
243
+
230
244
/**
231
245
* @brief Describes the number of different huge page sizes supported.
232
246
* @param[in] numa_node_index The index of the NUMA node to allocate memory on, in [0, numa_nodes_count).
233
247
* @retval 0 if huge pages are not supported or not available.
234
248
* @retval 1-4 on systems with huge page support (typically 2MB, 1GB sizes).
235
- * @note This API is @b not synchronized and should be called once during initialization.
236
249
*
237
250
* Huge pages reduce TLB (Translation Lookaside Buffer) pressure by using larger
238
251
* page sizes than the standard 4KB. This can significantly improve performance
@@ -244,21 +257,7 @@ size_t fu_count_quality_levels(void);
244
257
* - 16KB/64KB: Base page sizes on some ARM configurations
245
258
* @sa `fu_allocate_at_least` for NUMA-aware allocation with huge page support.
246
259
*/
247
- size_t fu_volume_huge_pages (size_t numa_node_index );
248
-
249
- /**
250
- * @brief Returns the volume of any pages (huge or regular) available on the specified NUMA node.
251
- * @param[in] numa_node_index The index of the NUMA node to query, in [0, numa_nodes_count).
252
- * @retval 0 if the NUMA node index is invalid or if no memory is available.
253
- * @retval Number of bytes of memory pages available on the specified NUMA node.
254
- * @note This API is @b not synchronized and should be called once during initialization.
255
- *
256
- * This function queries the operating system for the total amount of memory pages
257
- * (both huge pages and regular pages) available for allocation on the specified NUMA node.
258
- * This is useful for determining how much memory can be allocated for vector storage
259
- * based on a percentage of available memory.
260
- */
261
- size_t fu_volume_any_pages (size_t numa_node_index );
260
+ size_t fu_volume_huge_pages_in (size_t numa_node_index );
262
261
263
262
#pragma endregion - Metadata
264
263
0 commit comments