linux/Documentation/vm
Kirill A. Shutemov 33041a0d76 mm: mark remap_file_pages() syscall as deprecated
The remap_file_pages() system call is used to create a nonlinear
mapping, that is, a mapping in which the pages of the file are mapped
into a nonsequential order in memory.  The advantage of using
remap_file_pages() over using repeated calls to mmap(2) is that the
former approach does not require the kernel to create additional VMA
(Virtual Memory Area) data structures.

Supporting of nonlinear mapping requires significant amount of
non-trivial code in kernel virtual memory subsystem including hot paths.
Also to get nonlinear mapping work kernel need a way to distinguish
normal page table entries from entries with file offset (pte_file).
Kernel reserves flag in PTE for this purpose.  PTE flags are scarce
resource especially on some CPU architectures.  It would be nice to free
up the flag for other usage.

Fortunately, there are not many users of remap_file_pages() in the wild.
It's only known that one enterprise RDBMS implementation uses the
syscall on 32-bit systems to map files bigger than can linearly fit into
32-bit virtual address space.  This use-case is not critical anymore
since 64-bit systems are widely available.

The plan is to deprecate the syscall and replace it with an emulation.
The emulation will create new VMAs instead of nonlinear mappings.  It's
going to work slower for rare users of remap_file_pages() but ABI is
preserved.

One side effect of emulation (apart from performance) is that user can
hit vm.max_map_count limit more easily due to additional VMAs.  See
comment for DEFAULT_MAX_MAP_COUNT for more details on the limit.

[akpm@linux-foundation.org: fix spello]
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Dave Jones <davej@redhat.com>
Cc: Armin Rigo <arigo@tunes.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-06-06 16:08:17 -07:00
..
.gitignore
00-INDEX Documentation/: update 00-INDEX files 2014-02-10 16:01:40 -08:00
active_mm.txt
balance
cleancache.txt Cleanups: rename of flush to invalidate, moving reporting of statistics 2012-03-22 19:52:47 -07:00
frontswap.txt doc: fix quite a few typos within Documentation 2012-11-19 14:28:24 +01:00
highmem.txt
hugetlbpage.txt hugepage: mention libhugetlbfs in doc 2013-09-11 15:57:39 -07:00
hwpoison.txt mm/memory-failure.c: support use of a dedicated thread to handle SIGBUS(BUS_MCEERR_AO) 2014-06-04 16:54:13 -07:00
ksm.txt ksm: add some comments 2013-02-23 17:50:23 -08:00
numa
numa_memory_policy.txt Documentation/vm/numa_memory_policy.txt: fix wrong document in numa_memory_policy.txt 2014-04-18 16:40:08 -07:00
overcommit-accounting mm: add overcommit_kbytes sysctl variable 2014-01-21 16:19:44 -08:00
page_migration
pagemap.txt Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2013-07-04 11:40:58 -07:00
remap_file_pages.txt mm: mark remap_file_pages() syscall as deprecated 2014-06-06 16:08:17 -07:00
slub.txt Documentations: Fix slabinfo.c directory in vm/slub.txt 2012-05-10 11:45:23 +03:00
soft-dirty.txt mm: track vma changes with VM_SOFTDIRTY bit 2013-09-11 15:57:56 -07:00
split_page_table_lock x86, mm: do not leak page->ptl for pmd page tables 2013-11-21 16:42:28 -08:00
transhuge.txt doc: spelling error changes 2014-05-05 15:32:05 +02:00
unevictable-lru.txt doc: fix double words 2014-03-21 13:16:58 +01:00
zswap.txt Documentation/vm/zswap.txt: fix typos 2013-11-13 12:09:05 +09:00