Re: [PATCH 14/16] IB uverbs: add mthca user CQ support

From: Roland Dreier (rolandd_at_cisco.com)
Date: 06/29/05

  • Next message: Greg KH: "Re: [ANNOUNCE] ndevfs - a "nano" devfs"
    To: Andrew Morton <akpm@osdl.org>
    Date:	Wed, 29 Jun 2005 09:06:25 -0700
    
    

    >> + int is_kernel;

        Andrew> I assume we have one body of code which is capable of
        Andrew> handling data structures in either kenrel memory of user
        Andrew> memory? (guess).

        Andrew> If so, that's a fairly sensitive thing to be doing. Tell
        Andrew> us more, please.

    It's actually not that bad. A completion queue (CQ) is a basically a
    chunk of memory where completion information is written when a work
    request completes. The hardware can handle many CQs (64K is not an
    unreasonable number), and we always do things like allocation of CQ
    numbers, programming HW for CQ context, etc. in the kernel.

    Both the kernel and userspace can do data path operations like looking
    for a new CQ entry. This means that for userspace CQs, the actual
    memory where entries are written should be in userspace. However the
    struct mthca_cq will always be in the kernel.

    If you look at how the is_kernel flag is used, you can see that all it
    does is control whether we allocate/free the actual buffer and a few
    other things in the kernel, or just use the stuff that userspace has
    already allocated.

     - R.
    -
    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: Greg KH: "Re: [ANNOUNCE] ndevfs - a "nano" devfs"

    Relevant Pages

    • Re: [PATCH] Remove process freezer from suspend to RAM pathway
      ... Atomically sends SIGSTOP to all userspace processes in a non-trappable way, except the calling process and any process which is ptracing it. ... I don't think it matters whether it's userspace or kernel that does the suspending and I'm yet to see a good reason for it to be done from userspace. ... You don't actually care if its sleeping in the kernel somewhere, just as long as it doesn't allocate much memory. ... One CPU turns off all interrupts on itself and takes an atomic snapshot of kernel memory into the previously allocated storage. ...
      (Linux-Kernel)
    • Re: [PATCH] Remove process freezer from suspend to RAM pathway
      ... snapshot). ... swsusp and uswsusp do now) to only half the amount of memory. ... Atomically sends SIGSTOP to all userspace processes in a non- ... Kernel starts freeing memory and swapping stuff out to make ...
      (Linux-Kernel)
    • Re: [ANNOUNCE] Minneapolis Cluster Summit, July 29-30
      ... A userspace service will not. ... The kernel block device now ... > overload conditions that have caused the kernel to run low on memory ... > openais uses extensively: ...
      (Linux-Kernel)
    • Re: [ANNOUNCE] Minneapolis Cluster Summit, July 29-30
      ... >> in userspace, so why not do it there. ... The kernel block device now needs to yell to the user space ... > need to allocate some memory to do that, and, whoops, the kernel won't give ... preallocated so the openais executive (the thing that does all of the ...
      (Linux-Kernel)
    • Re: [openib-general] Re: [PATCH][RFC][0/4] InfiniBand userspace verbs implementation
      ... Andrew> The kernel can simply register and unregister ranges for ... Andrew> RDMA. ... Kernel accounting ... RDMA device, a process can create many memory ...
      (Linux-Kernel)