linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: John Hubbard <jhubbard@nvidia.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Gerald Schaefer <gerald.schaefer@de.ibm.com>,
	Andrea Arcangeli <aarcange@redhat.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Will Deacon <will@kernel.org>
Subject: Re: [PATCH v4 26/26] mm/gup: Remove task_struct pointer for all gup code
Date: Thu, 2 Jul 2020 20:52:55 -0400	[thread overview]
Message-ID: <20200703005255.GB6677@xz-x1> (raw)
In-Reply-To: <a5b6caba-28bf-4869-d1c9-984136f9f77b@nvidia.com>

On Wed, Jul 01, 2020 at 02:55:40PM -0700, John Hubbard wrote:
> On 2020-06-30 13:46, Peter Xu wrote:
> > After the cleanup of page fault accounting, gup does not need to pass
> > task_struct around any more.  Remove that parameter in the whole gup stack.
> > 
> > Signed-off-by: Peter Xu <peterx@redhat.com>
> > ---
> >   arch/arc/kernel/process.c                   |  2 +-
> >   arch/s390/kvm/interrupt.c                   |  2 +-
> >   arch/s390/kvm/kvm-s390.c                    |  2 +-
> >   arch/s390/kvm/priv.c                        |  8 +-
> >   arch/s390/mm/gmap.c                         |  4 +-
> >   drivers/gpu/drm/i915/gem/i915_gem_userptr.c |  2 +-
> >   drivers/infiniband/core/umem_odp.c          |  2 +-
> >   drivers/vfio/vfio_iommu_type1.c             |  4 +-
> >   fs/exec.c                                   |  2 +-
> >   include/linux/mm.h                          |  9 +-
> >   kernel/events/uprobes.c                     |  6 +-
> >   kernel/futex.c                              |  2 +-
> >   mm/gup.c                                    | 92 +++++++++------------
> >   mm/memory.c                                 |  2 +-
> >   mm/process_vm_access.c                      |  2 +-
> >   security/tomoyo/domain.c                    |  2 +-
> >   virt/kvm/async_pf.c                         |  2 +-
> >   virt/kvm/kvm_main.c                         |  2 +-
> >   18 files changed, 65 insertions(+), 82 deletions(-)
> > 
> 
> Looks good:
> 
>     Reviewed-by: John Hubbard <jhubbard@nvidia.com>
> 
> One minor refinement: in gup.c, if you add the following hunk on top of your
> changes, that will eradicate the last reference to struct task, in that file:
> 
> 
> diff --git a/mm/gup.c b/mm/gup.c
> index 8ddc48022d74..75c4b305828b 100644
> --- a/mm/gup.c
> +++ b/mm/gup.c
> @@ -1902,10 +1902,9 @@ static long __get_user_pages_remote(struct mm_struct *mm,
>   *              Or NULL if the caller does not require them.
>   *
>   * This is the same as get_user_pages_remote(), just with a
> - * less-flexible calling convention where we assume that the task
> - * and mm being operated on are the current task's and don't allow
> - * passing of a locked parameter.  We also obviously don't pass
> - * FOLL_REMOTE in here.
> + * less-flexible calling convention where we assume that the mm being operated
> + * on belongs to the current task, and doesn't allow passing of a locked
> + * parameter. We also obviously don't pass FOLL_REMOTE in here.
>   */
>  long get_user_pages(unsigned long start, unsigned long nr_pages,
>                 unsigned int gup_flags, struct page **pages,

Right.  Fixed it up, and with the r-b kept.  Thanks!

-- 
Peter Xu



      reply	other threads:[~2020-07-03  0:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-30 20:46 [PATCH v4 26/26] mm/gup: Remove task_struct pointer for all gup code Peter Xu
2020-07-01 21:55 ` John Hubbard
2020-07-03  0:52   ` Peter Xu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200703005255.GB6677@xz-x1 \
    --to=peterx@redhat.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=gerald.schaefer@de.ibm.com \
    --cc=jhubbard@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mpe@ellerman.id.au \
    --cc=torvalds@linux-foundation.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).