]> asedeno.scripts.mit.edu Git - linux.git/commit
mm: Add an apply_to_pfn_range interface
authorThomas Hellstrom <thellstrom@vmware.com>
Fri, 12 Oct 2018 15:06:06 +0000 (17:06 +0200)
committerThomas Hellstrom <thellstrom@vmware.com>
Tue, 18 Jun 2019 13:19:33 +0000 (15:19 +0200)
commit29875a52915e09abb9703722054f6443cb492ccc
treef0eb20b924b66b5d6480183f3c2d7cb9c8c0b675
parentc9e5f41f732057097cd66ab7b01e7f7a2ff6c795
mm: Add an apply_to_pfn_range interface

This is basically apply_to_page_range with added functionality:
Allocating missing parts of the page table becomes optional, which
means that the function can be guaranteed not to error if allocation
is disabled. Also passing of the closure struct and callback function
becomes different and more in line with how things are done elsewhere.

Finally we keep apply_to_page_range as a wrapper around apply_to_pfn_range

The reason for not using the page-walk code is that we want to perform
the page-walk on vmas pointing to an address space without requiring the
mmap_sem to be held rather than on vmas belonging to a process with the
mmap_sem held.

Notable changes since RFC:
Don't export apply_to_pfn range.

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rik van Riel <riel@surriel.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Huang Ying <ying.huang@intel.com>
Cc: Souptick Joarder <jrdr.linux@gmail.com>
Cc: "Jérôme Glisse" <jglisse@redhat.com>
Cc: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Ralph Campbell <rcampbell@nvidia.com> #v1
include/linux/mm.h
mm/memory.c