From: ebiederm+eric@npwt.net (Eric W. Biederman)
To: linux-mm@kvack.org
Subject: filemap_nopage is broken!!
Date: 22 Apr 1998 15:51:07 -0500 [thread overview]
Message-ID: <m1vhs1oa10.fsf@flinx.npwt.net> (raw)
While looking at what is needs to happen to get large file support
working on linux-intel, I discovered an interesting twist with
generic_file_mmap.
mmap being the most interesting case to port, because the generic
interface allows for non aligned mappings. Making it the most
intersting case to handle.
generic_file_mmap allows filesystem block aligned mappings if the
mapping is private. The way it implements this, after I finally
tracked it is broken.
For private mappings the same filemap_nopage function that is used for
shared mappings is used. The filemap_nopage function alwasy make sure
it's pages are in the page cache before it uses them.
For a private mapping (not page aligned) this results in a non-aligned
page to be created in the page cache.
Now if the following sequence of actions occure.
a) A page is mapped privately with poor alignment.
b) That part of the file is written again.
c) The page is again mapped privately with poor alignment.
When the page cache page is not scavenged between a and c, the same
data is read, despite the fact it has changed on disk, and in the
aligned page cache page!
That is broken behavior.
Does anyone know where it comes from?
Eric
next reply other threads:[~1998-04-22 21:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-04-22 20:51 Eric W. Biederman [this message]
1998-04-23 22:01 ` Stephen C. Tweedie
1998-04-24 0:51 ` Eric W. Biederman
1998-04-24 20:32 ` Stephen C. Tweedie
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=m1vhs1oa10.fsf@flinx.npwt.net \
--to=ebiederm+eric@npwt.net \
--cc=linux-mm@kvack.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