Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1334853

Re: remap_file_pages regression

From "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Newsgroups linux.kernel
Subject Re: remap_file_pages regression
Date 2016-02-15 23:20 +0100
Message-ID <r2zET-7er-19@gated-at.bofh.it> (permalink)
References <r2giS-2rc-11@gated-at.bofh.it> <r2ozM-824-31@gated-at.bofh.it> <r2zvb-794-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Feb 16, 2016 at 12:08:34AM +0200, Grazvydas Ignotas wrote:
> On Mon, Feb 15, 2016 at 12:26 PM, Kirill A. Shutemov
> <kirill.shutemov@linux.intel.com> wrote:
> > On Mon, Feb 15, 2016 at 03:32:55AM +0200, Grazvydas Ignotas wrote:
> >> Hi,
> >>
> >> since remap_file_pages() rework the following simple program fails.
> >> I haven't actually bisected this, only know it worked on 3.19 at least
> >> (I bought a new system now and need 4.2+ for hardware support).
> >
> > The patch below should fix the issue. Please test.
> 
> It works, thanks.
> Tested-by: Grazvydas Ignotas <notasas@gmail.com>
> 
> >
> >> If you are curious, the program is an emulator and is using
> >> remap_file_pages() to implement memory mirroring efficiently (and to
> >> remap things during run time).
> >
> > Could you elaborate on this?
> >
> > Why creating file on tmpfs/shmem (using memfd_create() for example) plus
> > plain mmap()s wouldn't work for you?
> 
> It works, but remap_file_pages() is just more convenient, you don't
> need many mmap()/munmap() calls (less syscalls)

mmap(MAP_FIXED) would do munmap() for you.

> > Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> 
> Cc: stable?
> Fixes: c8d78c182 (I guess?)

Right.

Cc: stable@vger.kernel.org # v4.0+
Fixes: c8d78c1823f4 ("mm: replace remap_file_pages() syscall with emulation")

-- 
 Kirill A. Shutemov

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

remap_file_pages regression Grazvydas Ignotas <notasas@gmail.com> - 2016-02-15 02:40 +0100
  Re: remap_file_pages regression "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2016-02-15 11:30 +0100
    Re: remap_file_pages regression Grazvydas Ignotas <notasas@gmail.com> - 2016-02-15 23:10 +0100
      Re: remap_file_pages regression "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2016-02-15 23:20 +0100

csiph-web