Re: [PATCH][RFC][0/4] InfiniBand userspace verbs implementation

From: Andrew Morton (akpm_at_osdl.org)
Date: 04/26/05

  • Next message: Brian Beardall: "Bug AMD 756 OHCI isochronous tranfers"
    Date:	Mon, 25 Apr 2005 15:32:56 -0700
    To: Timur Tabi <timur.tabi@ammasso.com>
    
    

    Timur Tabi <timur.tabi@ammasso.com> wrote:
    >
    > Andrew Morton wrote:
    >
    > > The way we expect get_user_pages() to be used is that the kernel will use
    > > get_user_pages() once per application I/O request.
    > >
    > > Are you saying that RDMA clients will semi-permanently own pages which were
    > > pinned by get_user_pages()? That those pages will be used for multiple
    > > separate I/O operations?
    >
    > Yes, absolutely!
    >
    > The memory buffer is allocated by the process (usually just via malloc) and
    > registed/pinned by the driver. It then stays pinned for the life of the process (typically).

    ug. What stops the memory from leaking if the process exits?

    I hope this is a privileged operation?

    > > If so, then that's a significant design departure and it would be good to
    > > hear why it is necessary.
    >
    > That's just how RMDA works. Once the memory is pinned, if the app wants to send data to
    > another node, it does two things:
    >
    > 1) Puts the data into its buffer
    > 2) Sends a "work request" to the driver with (among other things) the offset and length of
    > the data.
    >
    > This is a time-critical operation. It must occurs as fast as possible, which means the
    > memory must have already been pinned.

    It would be better to obtain this memory via a mmap() of some special
    device node, so we can perform appropriate permission checking and clean
    everything up on unclean application exit.

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Brian Beardall: "Bug AMD 756 OHCI isochronous tranfers"

    Relevant Pages

    • Re: problems -- camera stops shooting -- MORE INFO...
      ... last Sunday, after letting the camera "rest" for a few days, I took the camera out, it was beautiful out, sunny... ... I looked up the memory buffer in the manual, and it says as long as no. in memory buffer is more than 0 you can shoot.. ... telling us what memory cards you are using and more important detials ...
      (rec.photo.digital.slr-systems)
    • Re: [PATCH][RFC][0/4] InfiniBand userspace verbs implementation
      ... > separate I/O operations? ... The memory buffer is allocated by the process and ... Once the memory is pinned, if the app wants to send data to ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Memory allocation structures (dynarec)
      ... cache and another part which keeps track of pointers into x86 memory ... ptrstart: "Pointer to memory start" ... fragmentation, I would have a number of small memory buffers. ... because there is no portion of the memory buffer that big? ...
      (alt.lang.asm)
    • Re: Binary file read/write
      ... Dave O. wrote: ... Apart from a FileCopy, I wouldn't assume the file is 'small' enough to get it completely read in memory. ... About improving speed, when copying from a disc to another, look up the memory buffer of the disc and use that as pass-thru buffer. ...
      (microsoft.public.vb.general.discussion)
    • Re: Binary file read/write
      ... 'small' enough to get it completely read in memory. ... About improving speed, when copying from a disc to another, look up the ... memory buffer of the disc and use that as pass-thru buffer. ... Certainly reading a 2G file into memory in a single pass would cause ...
      (microsoft.public.vb.general.discussion)