lkml.org 
[lkml]   [2019]   [Jan]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/5] RDMA/uverbs: add owner parameter to ib_umem_get
On Tue, Jan 29, 2019 at 03:26:24PM +0200, Joel Nider wrote:
> ib_umem_get is a core function used by drivers that support RDMA.
> The 'owner' parameter signifies the process that owns the memory.
> Until now, it was assumed that the owning process was the current
> process. This adds the flexibility to specify a process other than
> the current process. All drivers that call this function are also
> updated, but the default behaviour is to keep backwards
> compatibility by assuming the current process is the owner when
> the 'owner' parameter is NULL.
>
> Signed-off-by: Joel Nider <joeln@il.ibm.com>
> ---

[snip]

> @@ -183,10 +196,11 @@ struct ib_umem *ib_umem_get(struct ib_ucontext *context, unsigned long addr,
>
> while (npages) {
> down_read(&mm->mmap_sem);
> - ret = get_user_pages_longterm(cur_base,
> + ret = get_user_pages_remote_longterm(owner_task,
> + mm, cur_base,
> min_t(unsigned long, npages,
> - PAGE_SIZE / sizeof (struct page *)),
> - gup_flags, page_list, vma_list);
> + PAGE_SIZE / sizeof(struct page *)),
> + gup_flags, page_list, vma_list, NULL);

qib was recently converted to get_user_pages_longterm. So qib would need to
be updated as well.

Ira

\
 
 \ /
  Last update: 2019-01-29 19:30    [W:0.097 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site