[openib-general] [PATCH][RFC][1/4] IB: core changes for userspace verbs

Krishna Kumar2 krkumar2 at in.ibm.com
Wed Apr 20 00:14:28 PDT 2005


Hi Roland,

> In particular, the memory pinning code in in uverbs_mem.c could stand a 
looking over.

1. In ib_umem_get(), I see you set ret = 0, which is unnecessary because 
chunk->nents
    is set based on ret value. Plus you already have a "while (ret)" to 
break out. "ret = 0"
    can be safely removed.

2. Also, as an optimization, in __ib_umem_release(), you could add another 
argument
    "page_dirty" which if set will do set_page_dirty_lock() (it seems to 
be a costly routine),
    and pass that argument as 0 in ib_umem_get() and 1 in 
ib_umem_release().

3. In __ib_umem_unmark() (sorry, I don't fully know this code very well 
and could be wrong),
    should the for loop have cur_base = vma->vm_start (instead of vm_end) 
since vma is set
    to the next one before this statement is executed ?

thanks,

- KK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20050420/d8cb6224/attachment.html>


More information about the general mailing list