Re: [RFC PATCH v2 10/21] netgpu: add network/gpu/host dma module
From: Greg KH <gregkh@linuxfoundation.org>
Date: 2020-07-28 16:26:17
On Mon, Jul 27, 2020 at 03:44:33PM -0700, Jonathan Lemon wrote:
From: Jonathan Lemon <redacted> Netgpu provides a data path for zero-copy sends and receives without having the host CPU touch the data. Protocol processing is done on the host CPU, while data is DMA'd to and from DMA mapped memory areas. The initial code provides transfers between (mlx5 / host memory) and (mlx5 / nvidia GPU memory). The use case for this module are GPUs used for machine learning, which are located near the NICs, and have a high bandwidth PCI connection between the GPU/NIC.
Do we have such a GPU driver in the kernel today? We can't add new apis/interfaces for no in-kernel users, as you well know. There's lots of crazyness in this patch, but this is just really odd:
+#if IS_MODULE(CONFIG_NETGPU) +#define MAYBE_EXPORT_SYMBOL(s) +#else +#define MAYBE_EXPORT_SYMBOL(s) EXPORT_SYMBOL(s) +#endif
Why is that needed at all? Why does no one else in the kernel need such a thing? And why EXPORT_SYMBOL() and not EXPORT_SYMBOL_GPL() (I have to ask). thanks, greg k-h