public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
To: Grazvydas Ignotas <notasas@gmail.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: remap_file_pages regression
Date: Tue, 16 Feb 2016 01:17:48 +0300	[thread overview]
Message-ID: <20160215221748.GB35514@black.fi.intel.com> (raw)
In-Reply-To: <CANOLnOObzMk7YQACtWz8rEKgP0DYVgvk0g9JViK1v7sP9n0Xeg@mail.gmail.com>

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

      reply	other threads:[~2016-02-15 22:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-15  1:32 remap_file_pages regression Grazvydas Ignotas
2016-02-15 10:26 ` Kirill A. Shutemov
2016-02-15 22:08   ` Grazvydas Ignotas
2016-02-15 22:17     ` Kirill A. Shutemov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160215221748.GB35514@black.fi.intel.com \
    --to=kirill.shutemov@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=notasas@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox