Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1508715

Re: [PATCH] mm: remove unnecessary __get_user_pages_unlocked() calls

From Lorenzo Stoakes <lstoakes@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH] mm: remove unnecessary __get_user_pages_unlocked() calls
Date 2016-10-26 01:50 +0200
Message-ID <swjDI-3W4-3@gated-at.bofh.it> (permalink)
References <swju2-3SL-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


The holdout for unexporting __get_user_pages_unlocked() is its invocation in
mm/process_vm_access.c: process_vm_rw_single_vec(), as this definitely _does_
seem to invoke VM_FAULT_RETRY behaviour which get_user_pages_remote() will not
trigger if we were to replace it with the latter.

I'm not sure how to proceed in this case - get_user_pages_remote() invocations
assume mmap_sem is held so can't offer VM_FAULT_RETRY behaviour as the lock
can't be assumed to be safe to release, and get_user_pages_unlocked() assumes
tsk, mm are set to current, current->mm respectively so we can't use that here
either.

Is it important to retain VM_FAULT_RETRY behaviour here, does it matter? If it
isn't so important then we can just go ahead and replace with
get_user_pages_remote() and unexport away.

Of course the whole idea of unexporting __get_user_pages_unlocked() might be
bogus so let me know in that case also :)

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] mm: remove unnecessary __get_user_pages_unlocked() calls Lorenzo Stoakes <lstoakes@gmail.com> - 2016-10-26 01:40 +0200
  Re: [PATCH] mm: remove unnecessary __get_user_pages_unlocked() calls Lorenzo Stoakes <lstoakes@gmail.com> - 2016-10-26 01:50 +0200
    Re: [PATCH] mm: remove unnecessary __get_user_pages_unlocked() calls Michal Hocko <mhocko@kernel.org> - 2016-10-26 11:20 +0200
      Re: [PATCH] mm: remove unnecessary __get_user_pages_unlocked() calls Lorenzo Stoakes <lstoakes@gmail.com> - 2016-10-26 11:40 +0200
        Re: [PATCH] mm: remove unnecessary __get_user_pages_unlocked() calls Michal Hocko <mhocko@kernel.org> - 2016-10-26 12:00 +0200
  Re: [PATCH] mm: remove unnecessary __get_user_pages_unlocked() calls Lorenzo Stoakes <lstoakes@gmail.com> - 2016-10-26 10:10 +0200
    Re: [PATCH] mm: remove unnecessary __get_user_pages_unlocked() calls Michal Hocko <mhocko@kernel.org> - 2016-10-26 11:10 +0200
  Re: [PATCH] mm: remove unnecessary __get_user_pages_unlocked() calls Michal Hocko <mhocko@kernel.org> - 2016-10-26 11:20 +0200
  [PATCH v2] mm: remove unnecessary __get_user_pages_unlocked() calls Lorenzo Stoakes <lstoakes@gmail.com> - 2016-10-26 11:30 +0200
    Re: [PATCH v2] mm: remove unnecessary __get_user_pages_unlocked()  calls Andrew Morton <akpm@linux-foundation.org> - 2016-10-27 02:20 +0200

csiph-web