[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200703005255.GB6677@xz-x1>
Date: Thu, 2 Jul 2020 20:52:55 -0400
From: Peter Xu <peterx@...hat.com>
To: John Hubbard <jhubbard@...dia.com>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Michael Ellerman <mpe@...erman.id.au>,
Gerald Schaefer <gerald.schaefer@...ibm.com>,
Andrea Arcangeli <aarcange@...hat.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Will Deacon <will@...nel.org>
Subject: Re: [PATCH v4 26/26] mm/gup: Remove task_struct pointer for all gup
code
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@...hat.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@...dia.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
Powered by blists - more mailing lists