From: Anton Altaparmakov <aia21@cam.ac.uk>
To: linux-kernel@vger.kernel.org
Cc: linux-fsdevel@vger.kernel.org
Subject: Question: fs meta data, page cache and locking
Date: Thu, 08 Mar 2001 13:26:56 +0000 [thread overview]
Message-ID: <5.0.2.1.2.20010308131755.00a53990@pop.cus.cam.ac.uk> (raw)
In-Reply-To: <20010308134114.P27675@nightmaster.csn.tu-chemnitz.de>
In-Reply-To: <5.0.2.1.2.20010308110922.00a41a60@pop.cus.cam.ac.uk> <5.0.2.1.2.20010308095213.00a59040@pop.cus.cam.ac.uk> <Pine.LNX.4.33.0103071931400.1409-100000@duckman.distro.con <5.0.2.1.2.20010308095213.00a59040@pop.cus.cam.ac.uk> <20010308115137.M27675@nightmaster.csn.tu-chemnitz.de> <5.0.2.1.2.20010308110922.00a41a60@pop.cus.cam.ac.uk>
It was suggested to repost the below as a new thread and to cc: linux-fsdevel.
Any comments would be appreciated.
TIA,
Anton
So here goes:
At 12:41 08/03/01, Ingo Oeser wrote:
> > On Thu, Mar 08, 2001 at 11:39:27AM +0000, Anton Altaparmakov wrote:
>[snip, attributions lost]
> > > > >+ * During disk I/O, PG_locked is used. This bit is set before I/O
> > > > >+ * and reset when I/O completes. page->wait is a wait queue of all
> > > > >+ * tasks waiting for the I/O on this page to complete.
>[snip]
> > When the NTFS file system driver needs to modify the meta data,
> > which will be in the page cache (meta data is stored in normal files on
> > NTFS, hence the page cache is very well suited to storing it with it's
> > page->mapping and page->index fields), does the NTFS driver need to set
> > PG_locked while writing to the page?
>[snip]
>May be you should raise these issues again under a separate
>subject and CC linux-fsdevel@vger.redhat.com for this.
>
>I think it is worth it, because Linus want all fs to use page
>cache for meta data and let buffer cache die slowly.
>
>Basically the rules go like this:
>
>The VM will wait for PG_locked pages, before it accesses them or
>ignore them, if it cannot wait.
>
>It will also try to read in pages, that are not PG_uptodate.
>
>But user space will never see metadata pages anyway, so you
>should be the only one, who cares about them. Just be prepared to
>writepage() and readpage() and the like.
>
>Just use lock_page() if you can sleep and TryLockPage() + EFAULT
>(or similar) if you cannot.
>
>Then just check Page_Uptodate() before you read and do
>ClearUptodate() if you start writing to the metadata.
>
>Since these operations are atomic bit operations, it should
>suffice for your purpose.
>
>But as stated above, I'm not very sure that I understand all the
>code and know of all the races.
>
>Multiple readers are AFAICS not yet possible with the current page
>cache.
>
>Regards
>
>Ingo Oeser
>--
>10.+11.03.2001 - 3. Chemnitzer LinuxTag <http://www.tu-chemnitz.de/linux/tag>
> <<<<<<<<<<<< come and join the fun >>>>>>>>>>>>
--
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Linux NTFS Maintainer / WWW: http://sourceforge.net/projects/linux-ntfs/
ICQ: 8561279 / WWW: http://www-stu.christs.cam.ac.uk/~aia21/
next prev parent reply other threads:[~2001-03-08 13:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.4.33.0103071931400.1409-100000@duckman.distro.con ectiva>
2001-03-08 10:11 ` Questions - Re: [PATCH] documentation for mm.h Anton Altaparmakov
2001-03-08 10:51 ` Ingo Oeser
2001-03-08 13:26 ` Anton Altaparmakov [this message]
2001-03-08 14:59 ` Question: fs meta data, page cache and locking Alexander Viro
2001-03-08 12:24 ` Questions - Re: [PATCH] documentation for mm.h Rik van Riel
2001-03-08 11:39 ` Anton Altaparmakov
2001-03-08 12:25 ` Rik van Riel
2001-03-08 12:41 ` Ingo Oeser
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=5.0.2.1.2.20010308131755.00a53990@pop.cus.cam.ac.uk \
--to=aia21@cam.ac.uk \
--cc=linux-fsdevel@vger.kernel.org \
--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®