Re: [PATCH v1 01/24] IB/core: Introduce new fast registration API

2015-09-29 Thread Sagi Grimberg
On 9/28/2015 11:57 PM, Bart Van Assche wrote: On 09/24/2015 12:37 AM, Sagi Grimberg wrote: On 9/23/2015 12:21 AM, Bart Van Assche wrote: On 09/17/2015 02:42 AM, Sagi Grimberg wrote: +} else if (last_page_off + dma_len < mr->page_size) { +/* chunk this fragment with

Re: [PATCH v1 01/24] IB/core: Introduce new fast registration API

2015-09-29 Thread Sagi Grimberg
On 9/29/2015 9:47 AM, Sagi Grimberg wrote: Shouldn't higher layers take care of this? Trying to implement the same coalescing algorithm at various layers isn't very optimal, although we need to decide and document which one is responsible. The block layer can take care of it, but I'm not sure

Re: [PATCH v1 01/24] IB/core: Introduce new fast registration API

2015-09-29 Thread Sagi Grimberg
Shouldn't higher layers take care of this? Trying to implement the same coalescing algorithm at various layers isn't very optimal, although we need to decide and document which one is responsible. The block layer can take care of it, but I'm not sure about NFS/RDS at the moment (IIRC Steve

Re: [PATCH v1 01/24] IB/core: Introduce new fast registration API

2015-09-28 Thread Christoph Hellwig
On Mon, Sep 28, 2015 at 01:57:52PM -0700, Bart Van Assche wrote: > >Actually I think it doesn't since it is only relevant for the else > >statement where we are passing the page_size boundary. > > Hello Sagi, > > Suppose that the following sg-list is passed to this function as { offset, > length

Re: [PATCH v1 01/24] IB/core: Introduce new fast registration API

2015-09-28 Thread Bart Van Assche
On 09/24/2015 12:37 AM, Sagi Grimberg wrote: On 9/23/2015 12:21 AM, Bart Van Assche wrote: On 09/17/2015 02:42 AM, Sagi Grimberg wrote: +} else if (last_page_off + dma_len < mr->page_size) { +/* chunk this fragment with the last */ +last_end_dma_addr

Re: [PATCH v1 01/24] IB/core: Introduce new fast registration API

2015-09-24 Thread Sagi Grimberg
On 9/23/2015 12:21 AM, Bart Van Assche wrote: On 09/17/2015 02:42 AM, Sagi Grimberg wrote: The new fast registration verg ib_map_mr_sg receives a scatterlist ^ verb ? Will fix. Thanks. +/** + * ib_map_mr_sg() - Map a memory region with the largest prefix

Re: [PATCH v1 01/24] IB/core: Introduce new fast registration API

2015-09-22 Thread Bart Van Assche
On 09/17/2015 02:42 AM, Sagi Grimberg wrote: The new fast registration verg ib_map_mr_sg receives a scatterlist ^ verb ? +/** + * ib_map_mr_sg() - Map a memory region with the largest prefix of + * a dma mapped SG list This description could be made more

[PATCH v1 01/24] IB/core: Introduce new fast registration API

2015-09-17 Thread Sagi Grimberg
The new fast registration verg ib_map_mr_sg receives a scatterlist and converts it to a page list under the verbs API thus hiding the specific HW mapping details away from the consumer. The provider drivers are provided with a generic helper ib_sg_to_pages that converts a scatterlist into a