[openib-general] [PATCH][RFC][1/4] IB: core changes for userspace verbs
roland at topspin.com
Wed Apr 20 09:50:26 PDT 2005
Krishna> 1. In ib_umem_get(), I see you set ret = 0, which is
Krishna> unnecessary because chunk-> nents is set based on ret
Krishna> value. Plus you already have a "while (ret)" to break
Krishna> out. "ret = 0" can be safely removed.
Krishna> 2. Also, as an optimization, in __ib_umem_release(), you
Krishna> could add another argument "page_dirty" which if set will
Krishna> do set_page_dirty_lock() (it seems to be a costly
Krishna> routine), and pass that argument as 0 in ib_umem_get()
Krishna> and 1 in ib_umem_release().
Seems reasonable, done as well.
Krishna> 3. In __ib_umem_unmark() (sorry, I don't fully know this
Krishna> code very well and could be wrong), should the for loop
Krishna> have cur_base = vma->vm_start (instead of vm_end) since
Krishna> vma is set to the next one before this statement is
Krishna> executed ?
Yes, there was a bug there. I think it's already fixed in the latest
More information about the general