firedancer icon indicating copy to clipboard operation
firedancer copied to clipboard

fd_shmem_numa_validate expects cpu_idx instead of numa_idx

Open Jefferson111 opened this issue 1 year ago • 0 comments

The function signature of fd_shmem_numa_validate is int fd_shmem_numa_validate( void const * mem, ulong page_sz, ulong page_cnt, ulong cpu_idx ). It seems to be expecting the cpu_idx and in the function itself, calls the fd_shmem_numa_idx( cpu_idx ) to lookup the actual numa_idx.

However, in fd_shmem_acquire_multi and other acquiring functions, it seems to pass in the sub_numa_idx instead of the cpu_idx. This is harmless as it only triggers a warning when validation fails, but I think this is a typo right?

https://github.com/firedancer-io/firedancer/blob/2d5ab4fff58d02c93eaa7a3f3f0cca60902a90b0/src/util/shmem/fd_shmem_admin.c#L523

Jefferson111 avatar Mar 13 '24 05:03 Jefferson111