On Mon, Jul 20, 2015 at 07:27:52PM +0300, Sagi Grimberg wrote: > >>I'm thinking now that this should have an input argument > >>of block_size. Maybe in the future ULPs would want to register > >>huge pages, it will be a shame to map it into PAGE_SIZE chunks... > > > >Why wouldn't it just transparently support huge pages? sg seems to > >have enough information. > > I'm not sure I know how to do that, can you explain how please?
Scan the scatter list, if the pages are all the same length and aligned on their length then that is the huge page size, otherwise use 4k. Convert to a shift. See if the driver supports that as a huge page size (currently missing from our driver API). Fill in the wr as you'd expect using the computed value as wr.fast_reg.page_shift Really, today nothing can use huge pages with IB_WR_FAST_REG_MR because there is no way to negotiate with the driver the supported page shift values. Hopefully your new version can get closer to fixing that by taking the wr construction away from the caller. Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
