From: Michal Hocko <mhocko@kernel.org>
To: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Rik van Riel <riel@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/4] mm: drop unused argument of zap_page_range()
Date: Mon, 19 Dec 2016 15:35:45 +0100 [thread overview]
Message-ID: <20161219143544.GJ5164@dhcp22.suse.cz> (raw)
In-Reply-To: <20161216141556.75130-3-kirill.shutemov@linux.intel.com>
On Fri 16-12-16 17:15:55, Kirill A. Shutemov wrote:
> There's no users of zap_page_range() who wants non-NULL 'details'.
> Let's drop it.
>
> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
kbuild robot has noticed that you should remove doc part as well
* @details: details of shared cache invalidation
then you can add
Acked-by: Michal Hocko <mhocko@suse.com>
> ---
> arch/s390/mm/gmap.c | 2 +-
> arch/x86/mm/mpx.c | 2 +-
> drivers/android/binder.c | 2 +-
> drivers/staging/android/ion/ion.c | 3 +--
> include/linux/mm.h | 2 +-
> mm/madvise.c | 2 +-
> mm/memory.c | 4 ++--
> 7 files changed, 8 insertions(+), 9 deletions(-)
>
> diff --git a/arch/s390/mm/gmap.c b/arch/s390/mm/gmap.c
> index ec1f0dedb948..59ac93714fa4 100644
> --- a/arch/s390/mm/gmap.c
> +++ b/arch/s390/mm/gmap.c
> @@ -687,7 +687,7 @@ void gmap_discard(struct gmap *gmap, unsigned long from, unsigned long to)
> /* Find vma in the parent mm */
> vma = find_vma(gmap->mm, vmaddr);
> size = min(to - gaddr, PMD_SIZE - (gaddr & ~PMD_MASK));
> - zap_page_range(vma, vmaddr, size, NULL);
> + zap_page_range(vma, vmaddr, size);
> }
> up_read(&gmap->mm->mmap_sem);
> }
> diff --git a/arch/x86/mm/mpx.c b/arch/x86/mm/mpx.c
> index e4f800999b32..4bfb31e79d5d 100644
> --- a/arch/x86/mm/mpx.c
> +++ b/arch/x86/mm/mpx.c
> @@ -796,7 +796,7 @@ static noinline int zap_bt_entries_mapping(struct mm_struct *mm,
> return -EINVAL;
>
> len = min(vma->vm_end, end) - addr;
> - zap_page_range(vma, addr, len, NULL);
> + zap_page_range(vma, addr, len);
> trace_mpx_unmap_zap(addr, addr+len);
>
> vma = vma->vm_next;
> diff --git a/drivers/android/binder.c b/drivers/android/binder.c
> index 3c71b982bf2a..d97f6725cf8c 100644
> --- a/drivers/android/binder.c
> +++ b/drivers/android/binder.c
> @@ -629,7 +629,7 @@ static int binder_update_page_range(struct binder_proc *proc, int allocate,
> page = &proc->pages[(page_addr - proc->buffer) / PAGE_SIZE];
> if (vma)
> zap_page_range(vma, (uintptr_t)page_addr +
> - proc->user_buffer_offset, PAGE_SIZE, NULL);
> + proc->user_buffer_offset, PAGE_SIZE);
> err_vm_insert_page_failed:
> unmap_kernel_range((unsigned long)page_addr, PAGE_SIZE);
> err_map_kernel_failed:
> diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c
> index b653451843c8..0fb0e28ace70 100644
> --- a/drivers/staging/android/ion/ion.c
> +++ b/drivers/staging/android/ion/ion.c
> @@ -865,8 +865,7 @@ static void ion_buffer_sync_for_device(struct ion_buffer *buffer,
> list_for_each_entry(vma_list, &buffer->vmas, list) {
> struct vm_area_struct *vma = vma_list->vma;
>
> - zap_page_range(vma, vma->vm_start, vma->vm_end - vma->vm_start,
> - NULL);
> + zap_page_range(vma, vma->vm_start, vma->vm_end - vma->vm_start);
> }
> mutex_unlock(&buffer->lock);
> }
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index 5f6bea4c9d41..92dcada8caaf 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -1158,7 +1158,7 @@ struct page *vm_normal_page_pmd(struct vm_area_struct *vma, unsigned long addr,
> int zap_vma_ptes(struct vm_area_struct *vma, unsigned long address,
> unsigned long size);
> void zap_page_range(struct vm_area_struct *vma, unsigned long address,
> - unsigned long size, struct zap_details *);
> + unsigned long size);
> void unmap_vmas(struct mmu_gather *tlb, struct vm_area_struct *start_vma,
> unsigned long start, unsigned long end);
>
> diff --git a/mm/madvise.c b/mm/madvise.c
> index 0e3828eae9f8..aa4c502caecb 100644
> --- a/mm/madvise.c
> +++ b/mm/madvise.c
> @@ -476,7 +476,7 @@ static long madvise_dontneed(struct vm_area_struct *vma,
> if (vma->vm_flags & (VM_LOCKED|VM_HUGETLB|VM_PFNMAP))
> return -EINVAL;
>
> - zap_page_range(vma, start, end - start, NULL);
> + zap_page_range(vma, start, end - start);
> return 0;
> }
>
> diff --git a/mm/memory.c b/mm/memory.c
> index c03b18f13619..eed102070dcb 100644
> --- a/mm/memory.c
> +++ b/mm/memory.c
> @@ -1375,7 +1375,7 @@ void unmap_vmas(struct mmu_gather *tlb,
> * Caller must protect the VMA list
> */
> void zap_page_range(struct vm_area_struct *vma, unsigned long start,
> - unsigned long size, struct zap_details *details)
> + unsigned long size)
> {
> struct mm_struct *mm = vma->vm_mm;
> struct mmu_gather tlb;
> @@ -1386,7 +1386,7 @@ void zap_page_range(struct vm_area_struct *vma, unsigned long start,
> update_hiwater_rss(mm);
> mmu_notifier_invalidate_range_start(mm, start, end);
> for ( ; vma && vma->vm_start < end; vma = vma->vm_next)
> - unmap_single_vma(&tlb, vma, start, end, details);
> + unmap_single_vma(&tlb, vma, start, end, NULL);
> mmu_notifier_invalidate_range_end(mm, start, end);
> tlb_finish_mmu(&tlb, start, end);
> }
> --
> 2.10.2
>
--
Michal Hocko
SUSE Labs
next prev parent reply other threads:[~2016-12-19 14:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-16 14:15 [PATCH 1/4] mm: drop zap_details::ignore_dirty Kirill A. Shutemov
2016-12-16 14:15 ` [PATCH 2/4] mm: drop zap_details::check_swap_entries Kirill A. Shutemov
2016-12-19 14:29 ` Michal Hocko
2016-12-16 14:15 ` [PATCH 3/4] mm: drop unused argument of zap_page_range() Kirill A. Shutemov
2016-12-16 17:02 ` kbuild test robot
2016-12-19 14:35 ` Michal Hocko [this message]
2016-12-16 14:15 ` [PATCH 4/4] oom-reaper: use madvise_dontneed() instead of unmap_page_range() Kirill A. Shutemov
2016-12-16 16:10 ` kbuild test robot
2016-12-16 16:45 ` kbuild test robot
2016-12-19 11:39 ` Tetsuo Handa
2016-12-19 14:00 ` Michal Hocko
2016-12-19 14:38 ` Michal Hocko
2016-12-19 14:22 ` [PATCH 1/4] mm: drop zap_details::ignore_dirty Michal Hocko
2016-12-19 17:17 Kirill A. Shutemov
2016-12-19 17:17 ` [PATCH 3/4] mm: drop unused argument of zap_page_range() Kirill A. Shutemov
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=20161219143544.GJ5164@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=peterz@infradead.org \
--cc=riel@redhat.com \
/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).