> -----Original Message----- > From: Guoqing Jiang <guoqing.jiang@xxxxxxxxx> > Sent: Friday, November 10, 2023 7:37 AM > To: Bernard Metzler <BMT@xxxxxxxxxxxxxx>; linux-rdma@xxxxxxxxxxxxxxx > Cc: jgg@xxxxxxxx; leon@xxxxxxxxxx; max7255@xxxxxxxx; > dennis.dalessandro@xxxxxxxxxxxxxxxxxxxx; benve@xxxxxxxxx; > vadim.fedorenko@xxxxxxxxx > Subject: [EXTERNAL] Re: [PATCH for-next v2] RDMA/siw: Use ib_umem_get() to > pin user pages > > Hi, > > On 11/4/23 15:56, Bernard Metzler wrote: > > Abandon siw private code to pin user pages during user > > memory registration, but use ib_umem_get() instead. > > This will help maintaining the driver in case of changes > > to the memory subsystem. > > > > Signed-off-by: Bernard Metzler <bmt@xxxxxxxxxxxxxx> > > --- > > v1 -> v2: remove RLIMIT memlock check logic, now done in ib_umem_get() > > --- > > Looks good, Acked-by: Guoqing Jiang <guoqing.jiang@xxxxxxxxx> > > ... > > > + for (i = 0; num_pages > 0; i++) { > > int nents = min_t(int, num_pages, PAGES_PER_CHUNK); > > struct page **plist = > > kcalloc(nents, sizeof(struct page *), GFP_KERNEL); > > > > if (!plist) { > > rv = -ENOMEM; > > - goto out_sem_up; > > + goto err_out; > > } > > umem->page_chunk[i].plist = plist; > > One off topic question, why two dimensional list is needed for siw umem? > Thanks in advance. > not needed. any list like this can be one dimensional. I wanted to keep the page list compact in memory. I consider moving to xarray - like rxe does - later, but wanted to move to ib_umem_get() first.