lkml.org 
[lkml]   [2020]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH rdma-next 1/4] lib/scatterlist: Refactor sg_alloc_table_from_pages
From
Date

On 9/7/2020 10:29 AM, Christoph Hellwig wrote:
> On Thu, Sep 03, 2020 at 06:54:34PM +0300, Leon Romanovsky wrote:
>> From: Maor Gottlieb <maorg@nvidia.com>
>>
>> Currently, sg_alloc_table_from_pages doesn't support dynamic chaining of
>> SG entries. Therefore it requires from user to allocate all the pages in
>> advance and hold them in a large buffer. Such a buffer consumes a lot of
>> temporary memory in HPC systems which do a very large memory registration.
>>
>> The next patches introduce API for dynamically allocation from pages and
>> it requires us to do the following:
>> * Extract the code to alloc_from_pages_common.
>> * Change the build of the table to iterate on the chunks and not on the
>> SGEs. It will allow dynamic allocation of more SGEs.
>>
>> Since sg_alloc_table_from_pages allocate exactly the number of chunks,
>> therefore chunks are equal to the number of SG entries.
> Given how few users __sg_alloc_table_from_pages has, what about just
> switching it to your desired calling conventions without another helper?

I tried it now. It didn't save a lot.  Please give me your decision and
if needed I will update accordingly.

\
 
 \ /
  Last update: 2020-09-07 14:40    [W:0.126 / U:0.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site