mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Will Newton" <will.newton@gmail.com>
To: LKML <linux-kernel@vger.kernel.org>
Subject: copy_page_range() with VM_LOCKED
Date: Mon, 10 Mar 2008 16:26:02 +0000	[thread overview]
Message-ID: <87a5b0800803100926t1e4a1bb3t905d02d4c311d5e@mail.gmail.com> (raw)

Hi all,

In order to optimize fork performance copy_page_range avoids copying
page tables under certain circumstances:

        if (!(vma->vm_flags &
(VM_HUGETLB|VM_NONLINEAR|VM_PFNMAP|VM_INSERTPAGE))) {
                if (!vma->anon_vma)
                        return 0;
        }

I have a VM_LOCKED vma that I would really, really like not to fault
on, but because copy_page_range does not copy the page tables of the
vma I do end up faulting in my VM_LOCKED vma. Now as far as I'm aware
mmap with MAP_LOCKED only promises the page will not be paged out, not
that the page will never fault but I would like to get that behaviour.

Would it be possible to add VM_LOCKED to the above conditional so
copy_page_range would always copy VM_LOCKED vma page tables or would
that be considered insane and broken?

Thanks,

             reply	other threads:[~2008-03-10 16:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-10 16:26 Will Newton [this message]
2008-03-10 17:40 ` Hugh Dickins
2008-03-10 18:53   ` Will Newton

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=87a5b0800803100926t1e4a1bb3t905d02d4c311d5e@mail.gmail.com \
    --to=will.newton@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®