Looks like you don't support regions that have both huge pages and normal pages either.
And this: > + while (npages && (ret <= PAGE_SIZE / > + sizeof (struct page *))) { > + if (get_user_pages(current, current->mm, > + cur_base, 1, 1, !write, > + &page_list[ret], NULL) < 0) > + goto out; > + > + ret++; > + cur_base += HPAGE_SIZE; > + npages--; > + } seems a little iffy as well. As I said I think the solution is to add a little more support to the core stuff in mm/ to make this simpler -- something like a function like get_user_pages() except returning the page list in a struct scatterlist so that it can return pages of different sizes would make sense to me. - R. _______________________________________________ openib-general mailing list openib-general@openib.org http://openib.org/mailman/listinfo/openib-general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general