public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Mike Kravetz <mike.kravetz@oracle•com>
To: Christoph Hellwig <hch@infradead•org>
Cc: linux-mm@kvack•org, linux-kernel@vger•kernel.org,
	linuxppc-dev@lists•ozlabs.org, linux-riscv@lists•infradead.org,
	linux-s390@vger•kernel.org, netdev@vger•kernel.org,
	David Hildenbrand <david@redhat•com>,
	Michal Hocko <mhocko@suse•com>, Peter Xu <peterx@redhat•com>,
	Nadav Amit <nadav.amit@gmail•com>,
	Matthew Wilcox <willy@infradead•org>,
	Vlastimil Babka <vbabka@suse•cz>, Rik van Riel <riel@surriel•com>,
	Will Deacon <will@kernel•org>,
	Michael Ellerman <mpe@ellerman•id.au>,
	Palmer Dabbelt <palmer@dabbelt•com>,
	Christian Borntraeger <borntraeger@linux•ibm.com>,
	Dave Hansen <dave.hansen@linux•intel.com>,
	Christian Brauner <brauner@kernel•org>,
	Eric Dumazet <edumazet@google•com>,
	Andrew Morton <akpm@linux-foundation•org>
Subject: Re: [RFC PATCH] mm: remove zap_page_range and change callers to use zap_vma_page_range
Date: Fri, 23 Dec 2022 13:22:08 -0800	[thread overview]
Message-ID: <Y6YcAKT+vVIyWTkF@monkey> (raw)
In-Reply-To: <Y6XW3hMtB7PrTSM5@infradead.org>

On 12/23/22 08:27, Christoph Hellwig wrote:
> >  		unsigned long size = vma->vm_end - vma->vm_start;
> >  
> >  		if (vma_is_special_mapping(vma, vdso_info[VDSO_ABI_AA64].dm))
> > -			zap_page_range(vma, vma->vm_start, size);
> > +			zap_vma_page_range(vma, vma->vm_start, size);
> >  #ifdef CONFIG_COMPAT_VDSO
> >  		if (vma_is_special_mapping(vma, vdso_info[VDSO_ABI_AA32].dm))
> > -			zap_page_range(vma, vma->vm_start, size);
> > +			zap_vma_page_range(vma, vma->vm_start, size);
> >  #endif
> 
> So for something called zap_vma_page_range I'd expect to just pass
> the vma and zap all of it, which this and many other callers want
> anyway.
> 
> > +++ b/arch/s390/mm/gmap.c
> > @@ -722,7 +722,7 @@ void gmap_discard(struct gmap *gmap, unsigned long from, unsigned long to)
> >  		if (is_vm_hugetlb_page(vma))
> >  			continue;
> >  		size = min(to - gaddr, PMD_SIZE - (gaddr & ~PMD_MASK));
> > -		zap_page_range(vma, vmaddr, size);
> > +		zap_vma_page_range(vma, vmaddr, size);
> 
> And then just call zap_page_range_single directly for those that
> don't want to zap the entire vma.

Thanks!

This sounds like a good idea and I will incorporate in a new patch.

-- 
Mike Kravetz

  reply	other threads:[~2022-12-23 21:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-16 19:20 [RFC PATCH] mm: remove zap_page_range and change callers to use zap_vma_page_range Mike Kravetz
2022-12-19 12:06 ` Michal Hocko
2022-12-19 19:22   ` Mike Kravetz
2023-01-05  1:14     ` Alistair Popple
2022-12-20 17:38 ` Peter Xu
2022-12-21  3:15 ` Michael Ellerman
2022-12-23 16:27 ` Christoph Hellwig
2022-12-23 21:22   ` Mike Kravetz [this message]
2022-12-29 16:22 ` Palmer Dabbelt

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=Y6YcAKT+vVIyWTkF@monkey \
    --to=mike.kravetz@oracle$(echo .)com \
    --cc=akpm@linux-foundation$(echo .)org \
    --cc=borntraeger@linux$(echo .)ibm.com \
    --cc=brauner@kernel$(echo .)org \
    --cc=dave.hansen@linux$(echo .)intel.com \
    --cc=david@redhat$(echo .)com \
    --cc=edumazet@google$(echo .)com \
    --cc=hch@infradead$(echo .)org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-mm@kvack$(echo .)org \
    --cc=linux-riscv@lists$(echo .)infradead.org \
    --cc=linux-s390@vger$(echo .)kernel.org \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=mhocko@suse$(echo .)com \
    --cc=mpe@ellerman$(echo .)id.au \
    --cc=nadav.amit@gmail$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=palmer@dabbelt$(echo .)com \
    --cc=peterx@redhat$(echo .)com \
    --cc=riel@surriel$(echo .)com \
    --cc=vbabka@suse$(echo .)cz \
    --cc=will@kernel$(echo .)org \
    --cc=willy@infradead$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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