@@ -201,27 +201,32 @@ static umf_result_t query_attribute_value(void *srcMemoryTarget,
201
201
memattr_type_t type ) {
202
202
hwloc_topology_t topology = umfGetTopology ();
203
203
if (!topology ) {
204
+ LOG_PERR ("Retrieving cached topology failed" );
204
205
return UMF_RESULT_ERROR_NOT_SUPPORTED ;
205
206
}
206
207
207
208
hwloc_obj_t srcNumaNode = hwloc_get_obj_by_type (
208
209
topology , HWLOC_OBJ_NUMANODE ,
209
210
((struct numa_memory_target_t * )srcMemoryTarget )-> physical_id );
210
211
if (!srcNumaNode ) {
212
+ LOG_PERR ("Getting HWLOC object by type failed" );
211
213
return UMF_RESULT_ERROR_INVALID_ARGUMENT ;
212
214
}
213
215
214
216
hwloc_obj_t dstNumaNode = hwloc_get_obj_by_type (
215
217
topology , HWLOC_OBJ_NUMANODE ,
216
218
((struct numa_memory_target_t * )dstMemoryTarget )-> physical_id );
217
219
if (!dstNumaNode ) {
220
+ LOG_PERR ("Getting HWLOC object by type failed" );
218
221
return UMF_RESULT_ERROR_INVALID_ARGUMENT ;
219
222
}
220
223
221
224
// Given NUMA nodes aren't local, HWLOC returns an error in such case.
222
225
if (!hwloc_bitmap_intersects (srcNumaNode -> cpuset , dstNumaNode -> cpuset )) {
223
226
// Since we want to skip such query, we return the worst possible
224
227
// value for given memory attribute.
228
+ LOG_PDEBUG ("Testing whether two bitmaps intersect failed, using the "
229
+ "worst value" );
225
230
* value = memattr_get_worst_value (type );
226
231
return UMF_RESULT_SUCCESS ;
227
232
}
@@ -246,6 +251,8 @@ static umf_result_t query_attribute_value(void *srcMemoryTarget,
246
251
int ret = hwloc_memattr_get_value (topology , hwlocMemAttrType , dstNumaNode ,
247
252
& initiator , 0 , & memAttrValue );
248
253
if (ret ) {
254
+ LOG_PERR ("Getting an attribute value for a specific target NUMA node "
255
+ "failed" );
249
256
return (errno == EINVAL ) ? UMF_RESULT_ERROR_NOT_SUPPORTED
250
257
: UMF_RESULT_ERROR_UNKNOWN ;
251
258
}
0 commit comments