mm: replace remap_file_pages() syscall with emulation
remap_file_pages(2) was invented to be able efficiently map parts of huge
file into limited 32-bit virtual address space such as in database
workloads.
Nonlinear mappings are pain to support and it seems there's no legitimate
use-cases nowadays since 64-bit systems are widely available.
Let's drop it and get rid of all these special-cased code.
The patch replaces the syscall with emulation which creates new VMA on
each remap_file_pages(), unless they it can be merged with an adjacent
one.
I didn't find *any* real code that uses remap_file_pages(2) to test
emulation impact on. I've checked Debian code search and source of all
packages in ALT Linux. No real users: libc wrappers, mentions in strace,
gdb, valgrind and this kind of stuff.
There are few basic tests in LTP for the syscall. They work just fine
with emulation.
To test performance impact, I've written small test case which demonstrate
pretty much worst case scenario: map 4G shmfs file, write to begin of
every page pgoff of the page, remap pages in reverse order, read every
page.
The test creates 1 million of VMAs if emulation is in use, so I had to set
vm.max_map_count to 1100000 to avoid -ENOMEM.
Fabian Frederick [Thu, 26 Jun 2014 00:43:21 +0000 (10:43 +1000)]
kernel/kprobes.c: convert printk to pr_foo()
Also fixes some checkpatch warnings
-Static initialization
-Lines over 80 characters
Signed-off-by: Fabian Frederick <fabf@skynet.be> Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Joe Perches [Thu, 26 Jun 2014 00:43:21 +0000 (10:43 +1000)]
drivers/net/ethernet/amd/pcnet32.c: neaten and remove unnecessary OOM messages
Make the code flow a little better for 80 columns.
Use a consistent style for the RX and TX rings allocation.
Use BIT macro.
Use a temporary unsiged int entries for (1<<size).
Remove the OOM messages as they duplicate the generic
OOM and dump_stack() provided by the memory subsystem.
Reflow allocs to 80 columns.
Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Don Fry <pcnet32@frontier.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Joe Perches [Thu, 26 Jun 2014 00:43:19 +0000 (10:43 +1000)]
rtlwifi: use pci_zalloc_consistent
Remove the now unnecessary memset too.
Signed-off-by: Joe Perches <joe@perches.com> Cc: Larry Finger <Larry.Finger@lwfinger.net> Cc: Chaoming Li <chaoming_li@realsil.com.cn> Cc: "John W. Linville" <linville@tuxdriver.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Joe Perches [Thu, 26 Jun 2014 00:43:19 +0000 (10:43 +1000)]
ipw2100: use pci_zalloc_consistent
Remove the now unnecessary memset too.
Signed-off-by: Joe Perches <joe@perches.com> Cc: Stanislav Yakovlev <stas.yakovlev@gmail.com> Cc: "John W. Linville" <linville@tuxdriver.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Joe Perches [Thu, 26 Jun 2014 00:43:19 +0000 (10:43 +1000)]
irda: use pci_zalloc_consistent
Remove the now unnecessary memset too.
Signed-off-by: Joe Perches <joe@perches.com> Cc: Samuel Ortiz <samuel@sortiz.org> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Joe Perches [Thu, 26 Jun 2014 00:43:18 +0000 (10:43 +1000)]
sky2: use pci_zalloc_consistent
Remove the now unnecessary memset too.
Signed-off-by: Joe Perches <joe@perches.com> Cc: Mirko Lindner <mlindner@marvell.com> Cc: Stephen Hemminger <stephen@networkplumber.org> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Joe Perches [Thu, 26 Jun 2014 00:43:18 +0000 (10:43 +1000)]
enic: use pci_zalloc_consistent
Remove the now unnecessary memset too.
Signed-off-by: Joe Perches <joe@perches.com> Cc: Christian Benvenuti <benve@cisco.com> Cc: Sujith Sankar <ssujith@cisco.com> Cc: Govindarajulu Varadarajan <_govind@gmx.com> Cc: Neel Patel <neepatel@cisco.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Joe Perches [Thu, 26 Jun 2014 00:43:17 +0000 (10:43 +1000)]
amd: use pci_zalloc_consistent
Remove the now unnecessary memset too.
Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Don Fry <pcnet32@frontier.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Joe Perches [Thu, 26 Jun 2014 00:43:17 +0000 (10:43 +1000)]
infiniband: use pci_zalloc_consistent
Remove the now unnecessary memset too.
Signed-off-by: Joe Perches <joe@perches.com> Cc: Tom Tucker <tom@opengridcomputing.com> Acked-by: Steve Wise <swise@opengridcomputing.com> Cc: Roland Dreier <roland@kernel.org> Cc: Sean Hefty <sean.hefty@intel.com> Cc: Hal Rosenstock <hal.rosenstock@gmail.com> Cc: Faisal Latif <faisal.latif@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Daniel Walter [Thu, 26 Jun 2014 00:43:16 +0000 (10:43 +1000)]
include/linux: remove strict_strto* definitions
Remove obsolete and unused strict_strto* functions
Signed-off-by: Daniel Walter <dwalter@google.com> Acked-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Daniel Walter [Thu, 26 Jun 2014 00:43:15 +0000 (10:43 +1000)]
net/sunrpc: replace strict_strto calls
Replace obsolete strict_strto calls with appropriate kstrto calls
Signed-off-by: Daniel Walter <dwalter@google.com> Cc: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Daniel Walter [Thu, 26 Jun 2014 00:43:15 +0000 (10:43 +1000)]
drivers/scsi: replace strict_strto calls
Replace obsolete strict_strto with more appropriate kstrto calls
Signed-off-by: Daniel Walter <dwalter@google.com> Cc: "James E.J. Bottomley" <JBottomley@parallels.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Daniel Walter [Thu, 26 Jun 2014 00:43:15 +0000 (10:43 +1000)]
arch/x86: replace strict_strto calls
Replace obsolete strict_strto calls with appropriate kstrto calls
Signed-off-by: Daniel Walter <dwalter@google.com> Acked-by: Borislav Petkov <bp@suse.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Replace strict_strto calls with more appropriate kstrto calls
Signed-off-by: Daniel Walter <dwalter@google.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>