1. 前言回顾
alloc memory of gpu中指出,alloc的ioctl只是作了物理内存的申请,并没有建立虚拟地址与物理地址的映射关系。映射关系的建立就是这个map memory的ioctl中实现的。
2. ioctl参数分析
可以看出,该ioctl把handle对应的kfd_mem(也就是bo),map到指定的设备上,自然也就是该设备对应的vm上。参数四进一出,很好理解,不再赘言。
/* Map memory to one or more GPUs
*
* @handle: memory handle returned by alloc
* @device_ids_array_ptr: array of gpu_ids (__u32 per device)
* @n_devices: number of devices in the array
* @n_success: number of devices mapped successfully
*
* @n_success returns information to the caller how many devices from
* the start of the array h
订阅专栏 解锁全文
9578

被折叠的 条评论
为什么被折叠?



