RE: [openib-general] Re: [PATCH][RFC][0/4] InfiniBand userspace verbsimplementation
From: Bob Woodruff
Date: Mon Apr 25 2005 - 17:54:26 EST
Andrew Morton wrote,
>Yes, we expect that all the pages which get_user_pages() pinned will become
>unpinned within the context of the syscall which pinned the pages. Or
>shortly after, in the case of async I/O.
>This is because there is no file descriptor or anything else associated
>with the pages which permits the kernel to clean stuff up on unclean
>application exit. Also there are the obvious issues with permitting
>pinning of unbounded amounts of memory.
There definitely needs to be a mechanism to prevent people from pinning
too much memory. We saw issues in the sourceforge stack and some of the
vendors stacks where we could lock memory till the system hung.
In the sourceforge InfiniBand stack, we put in a
check to make sure that people did not pin too much memory.
It was sort of a crude/bruit force mechanism, but effective. I think that we
limited people from locking down more that 1/2 of kernel memory or
70 % of all memory (it was tunable with a module option) and if they
exceeded
the limit, their requests to register memory would begin to fail.
Arlin can provide details on how we did it or people can look at the
IBAL code for an example.
woody
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/