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
_______________________________________________ openib-general mailing list [email protected] http://openib.org/mailman/listinfo/openib-general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
