From: Andrew Morton <akpm@osdl.org>
To: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: linux-mm@kvack.org
Subject: Re: [PATCH] get_user_pages shortcut for anonymous pages.
Date: Sun, 4 Apr 2004 22:59:20 -0700 [thread overview]
Message-ID: <20040404225920.340c12ee.akpm@osdl.org> (raw)
In-Reply-To: <20040402141710.GA1903@mschwid3.boeblingen.de.ibm.com>
Martin Schwidefsky <schwidefsky@de.ibm.com> wrote:
>
> struct page *map;
> int lookup_write = write;
> while (!(map = follow_page(mm, start, lookup_write))) {
> + /*
> + * Shortcut for anonymous pages. We don't want
> + * to force the creation of pages tables for
> + * insanly big anonymously mapped areas that
> + * nobody touched so far. This is important
> + * for doing a core dump for these mappings.
> + */
> + if (!lookup_write &&
> + (!vma->vm_ops || !vma->vm_ops->nopage)) {
> + map = ZERO_PAGE(start);
> + break;
> + }
> spin_unlock(&mm->page_table_lock);
I think this will do the wrong thing if the virtual address refers to an
anon page which is swapped out.
You'd need to teach follow_page() to return one of three values:
page-present, page-not-present-but-used-to-be or
page-not-present-and-never-was.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
next prev parent reply other threads:[~2004-04-05 5:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-02 14:17 Martin Schwidefsky
2004-04-05 5:59 ` Andrew Morton [this message]
2004-04-05 14:24 Martin Schwidefsky
2004-04-05 21:29 ` Andrew Morton
2004-04-06 7:24 Martin Schwidefsky
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=20040404225920.340c12ee.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=linux-mm@kvack.org \
--cc=schwidefsky@de.ibm.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