RE: [rdma-next 12/12] RDMA/rdmavt: Adapt to handle non-uniform sizes on umem SGEs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>Subject: Re: [rdma-next 12/12] RDMA/rdmavt: Adapt to handle non-uniform sizes
>on umem SGEs
>
>On Mon, Feb 11, 2019 at 09:25:08AM -0600, Shiraz Saleem wrote:
>> From: "Shiraz, Saleem" <shiraz.saleem@xxxxxxxxx>
>>
>> rdmavt expects a uniform size on all umem SGEs which is currently at
>> PAGE_SIZE.
>>
>> Adapt to a umem API change which could return non-uniform sized SGEs
>> due to combining contiguous PAGE_SIZE regions into an SGE. Unfold the
>> larger SGEs into a list of PAGE_SIZE elements.
>>
>> Additionally, purge umem->page_shift usage in the driver as its only
>> relevant for ODP MRs. Use system page size and shift instead.

[.....]

>> +		chunk_pages = sg_dma_len(sg) >> PAGE_SHIFT;
>
>Mixing dma_len with non-DMA pages is not right

This is a mistake. We should be able to follow what we did for rxe
and just use the for_each_sg_page variant here. 

>
>> +		for (i = 0; i < chunk_pages; i++) {
>> +			void *vaddr;
>> +
>> +			vaddr = page_address(nth_page(page, i));
>
>Why isn't this loop just transformed into for_each_sg_page?
>
>Jason



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux