Re: [RFC, PATCH 0/8] remap_file_pages() decommission

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 06, 2014 at 02:51:24PM -0700, Linus Torvalds wrote:
> On Tue, May 6, 2014 at 2:35 PM, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
> > On Tue,  6 May 2014 17:37:24 +0300 "Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx> wrote:
> >
> >> This patchset replaces the syscall with emulation which creates new VMA on
> >> each remap and remove code to support non-linear mappings.
> >>
> >> Nonlinear mappings are pain to support and it seems there's no legitimate
> >> use-cases nowadays since 64-bit systems are widely available.
> >>
> >> It's not yet ready to apply. Just to give rough idea of what can we get if
> >> we'll deprecated remap_file_pages().
> >>
> >> I need to split patches properly and write correct commit messages. And there's
> >> still code to remove.
> >
> > hah.  That's bold.  It would be great if we can get away with this.
> >
> > Do we have any feeling for who will be impacted by this and how badly?
> 
> I *would* love to get rid of the nonlinear mappings, but I really have
> zero visibility into who ended up using it. I assume it's a "Oracle on
> 32-bit x86" kind of thing.

There're funny PyPy people who wants to use remap_file_pages() in new code to
build software transaction memory[1]. It sounds just crazy to me.

[1] https://lwn.net/Articles/587923/

> I think this is more of a distro question. Plus perhaps an early patch
> to just add a warning first so that we can see who it triggers for?

Something like this?

>From 0371f9b74aa2542e3e85682552cc1b11412f3b0b Mon Sep 17 00:00:00 2001
From: "Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx>
Date: Wed, 7 May 2014 01:52:12 +0300
Subject: [PATCH] mm: mark remap_file_pages() syscall as deprecated

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 deprecate remap_file_pages() syscall in hope to get rid of code
one day.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>
Cc: <stable@xxxxxxxxxxxxxxx>
---
 mm/fremap.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/mm/fremap.c b/mm/fremap.c
index 34feba60a17e..af504f443321 100644
--- a/mm/fremap.c
+++ b/mm/fremap.c
@@ -152,6 +152,9 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
 	int has_write_lock = 0;
 	vm_flags_t vm_flags = 0;
 
+	printk_once(KERN_WARNING "%s (%d) uses depricated "
+			"remap_file_pages(2) syscall.\n",
+			current->comm, current->pid);
 	if (prot)
 		return err;
 	/*
-- 
 Kirill A. Shutemov

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]