From: Mark B <mark@lemna.hr>
To: Matthew Wilcox <willy@debian.org>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: same page access
Date: Wed, 22 Oct 2003 19:09:58 +0200 [thread overview]
Message-ID: <200310221909.58066.mark@lemna.hr> (raw)
In-Reply-To: <20031022112128.GN18370@parcelfarce.linux.theplanet.co.uk>
On Wednesday 22 October 2003 13:21, you wrote:
> On Wed, Oct 22, 2003 at 10:15:17AM +0200, Mark B wrote:
> > I usually dig around kernel code to find answers, but I think this would
> > take alot more time to dig than to explain from someone.
> >
> > Process 1 opens a file x, and does a read on the first few bytes, which
> > in turn causes kernel to load the first page from the file (if the
> > filesystem is using address_space_operations for all of it's access to
> > files)
> > Now a process 2 opens the same file and overwrites a few first bytes.
> >
> > Now, how does the kernel update the Process 1's page if it is already
> > loaded?
>
> It doesn't. A subsequent write() to a file doesn't affect any previous
> read()s by this or any other process. The situation is diferent if
> you're talking about mmap(), but as far as I can tell, you aren't.
Mmm sorry I formulated the question a bit wrong, here's the correction;
I know that the data what was read() before the write() can't be affected,
it's a perfectly normal condition, but I'm talking about the page of data the
kernel loaded in the VFS for that file handle, is the data the same copy of
data that is served to other processes? So a read() by P1 after P2 has did a
write() in the same area, will it lead to a reload of the page since the P2
marked the area dirty? Or simply they're working on the same memory page? Is
there any locking (by commit_write()?)
Mark
--
Mark Burazin
mark@lemna.hr
---<>---<>---<>---<>---<>---<>---<>---<>---<>
Lemna d.o.o.
http://www.lemna.biz - info@lemna.hr
<>---<>---<>---<>---<>---<>---<>---<>---<>---
next prev parent reply other threads:[~2003-10-22 17:04 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-07 19:02 zeroes read back more often than appended Pat LaVarre
2003-10-07 20:54 ` Pat LaVarre
2003-10-08 3:49 ` Ben Fennema
2003-10-08 16:41 ` Pat LaVarre
2003-10-08 16:47 ` editable udf metadata Pat LaVarre
2003-10-08 17:51 ` Pat LaVarre
2003-10-08 18:09 ` big-endian udfct_1_0r2 Pat LaVarre
2003-10-08 18:30 ` Matthew Wilcox
[not found] ` <3F8472FE.9040403@lougher.demon.co.uk>
2003-10-08 19:49 ` Matthew Wilcox
2003-10-08 20:43 ` Phillip Lougher
2003-10-21 21:54 ` editable udf metadata Pat LaVarre
2003-10-21 23:17 ` Pat LaVarre
2003-10-23 16:06 ` Pat LaVarre
2003-10-24 21:40 ` Pat LaVarre
2003-10-22 8:15 ` same page access Mark B
2003-10-22 11:21 ` Matthew Wilcox
2003-10-22 17:09 ` Mark B [this message]
2003-10-22 17:10 ` Matthew Wilcox
2003-10-08 17:02 ` zeroes read back more often than appended Pat LaVarre
2003-10-08 17:06 ` toggling smp clears x86_mce_p4thermal of make xconfig Pat LaVarre
2003-10-08 17:21 ` zeroes read back more often than appended Pat LaVarre
2003-10-08 16:46 ` soft trace of read/write of drivers/block/loop.c Pat LaVarre
2003-10-08 20:32 ` zeroes read back more often than appended Pat LaVarre
2003-10-09 20:54 ` Pat LaVarre
2003-10-10 0:52 ` Pat LaVarre
2003-10-10 16:39 ` Pat LaVarre
2003-10-10 18:15 ` Pat LaVarre
2003-10-14 0:38 ` Pat LaVarre
2003-10-14 1:48 ` Pat LaVarre
2003-10-20 23:20 ` Pat LaVarre
2003-10-21 14:47 ` Pat LaVarre
2003-10-21 16:46 ` Pat LaVarre
2003-10-21 18:44 ` Pat LaVarre
2003-10-23 18:52 ` Pat LaVarre
2003-10-27 21:55 ` Pat LaVarre
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=200310221909.58066.mark@lemna.hr \
--to=mark@lemna.hr \
--cc=linux-fsdevel@vger.kernel.org \
--cc=willy@debian.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