On Tue, Feb 4, 2025 at 11:41 AM Andrew Lunn [off-list ref] wrote:
quoted
quoted
If unprivileged applications could use unlimited amount of kernel
memory, they could hurt the whole system stability, possibly causing
functional issue of core kernel due to ENOMEM.
The we always try to bound/put limits on amount of kernel memory
user-space application can use.
Homa's receive buffer space is *not kernel memory*; it's just a large
mmapped region created by the application., no different from an
application allocating a large region of memory for its internal
computation.
ulimit -v should be able to limit this, if user space is doing the
mmap(). It should be easy to test. Set a low enough limit the mmap()
should fail, and i guess you get MAP_FAILED and errno = ENOMEM?
I just tried this, and yes, if ulimt -v is set low enough, user apps
can't mmap buffer space to pass to Homa.
-John-