lkml.org 
[lkml]   [2020]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH rdma-next v4 4/4] RDMA/umem: Move to allocate SG table from pages
From
Date

On 9/30/2020 6:14 PM, Jason Gunthorpe wrote:
> On Wed, Sep 30, 2020 at 06:05:15PM +0300, Maor Gottlieb wrote:
>> This is right only for the last iteration. E.g. in the first iteration in
>> case that there are more pages (left_pages), then we allocate
>> SG_MAX_SINGLE_ALLOC.  We don't know how many pages from the second iteration
>> will be squashed to the SGE from the first iteration.
> Well, it is 0 or 1 SGE's. Check if the first page is mergable and
> subtract one from the required length?
>
> I dislike this sg_mark_end() it is something that should be internal,
> IMHO.

I can move it to __sg_alloc_table_from_pages:

        sgt->nents = tmp_nents;
+ if (!left_pages)
+         sg_mark_end(s);
 out:
        return s;

>
> Jason

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