From: Andrew Morton <andrewm@uow.edu.au>
To: Chris Mason <mason@suse.com>
Cc: Rik van Riel <riel@conectiva.com.br>,
Marcelo Tosatti <marcelo@conectiva.com.br>,
Xuan Baldauf <xuan--lkml@baldauf.org>,
linux-kernel@vger.kernel.org, andrea@suse.de,
"reiserfs-list@namesys.com" <reiserfs-list@namesys.com>
Subject: Re: VM deadlock
Date: Thu, 28 Jun 2001 13:21:28 +1000 [thread overview]
Message-ID: <3B3AA2B8.93F9A28C@uow.edu.au> (raw)
In-Reply-To: <Pine.LNX.4.33L.0106271641570.23373-100000@duckman.distro.conectiva> <933130000.993673450@tiny>
Chris Mason wrote:
>
> ...
> The work around I've been using is the dirty_inode method. Whenever
> mark_inode_dirty is called, reiserfs logs the dirty inode. This means
> inode changes are _always_ reflected in the buffer cache right away, and
> the inode itself is never actually dirty.
reiserfs_mark_inode_dirty() has taken a copy of the in-core inode, so
it can do this:
spin_lock(&inode_lock);
if ((inode->i_state & I_LOCK) == 0)
inode->i_state &= ~(I_DIRTY_SYNC|I_DIRTY_DATASYNC);
spin_unlock(&inode_lock);
Unfortunately there is no API function to do this, so inode_lock
needs to be exported :(
The effect of this is that the filesystem almost never has dirty inodes
as far as the VFS is concerned: shrink_icache_memory() can just drop the
inodes without calling into the fs at all. Which is nice.
So you end up with:
reiserfs_write_inode(struct inode * inode, int do_sync)
{
}
The write_inode() method is still called by shrink_icache_memory()
with extreme infrequency. I haven't looked into the reasons why. It may
be an SMP window.
This is not just a memory-tweak-optimisation hack, BTW.
shrink_icache->write_inode is a horrible embarrassment because it
can be called at any time. The caller may have a transaction open
against a different fs. It would cause nested transactions which
will exceed the current reservation, which will require a commit,
which simply cannot be performed, etc.
sync(), fsync() and msync() can be handled in ->fsync().
-
next prev parent reply other threads:[~2001-06-28 3:22 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-27 14:27 Xuan Baldauf
2001-06-27 13:11 ` Marcelo Tosatti
2001-06-27 16:13 ` Xuan Baldauf
2001-06-27 15:09 ` Chris Mason
2001-06-27 16:20 ` Xuan Baldauf
2001-06-27 17:43 ` Marcelo Tosatti
2001-06-27 19:36 ` Chris Mason
2001-06-27 19:43 ` Rik van Riel
2001-06-27 20:24 ` Chris Mason
2001-06-27 20:36 ` Rik van Riel
2001-06-27 20:52 ` Chris Mason
2001-06-28 3:21 ` Andrew Morton [this message]
2001-06-28 12:53 ` Chris Mason
2001-06-28 14:08 ` Andrew Morton
2001-06-28 14:25 ` Chris Mason
2001-06-27 19:50 ` [reiserfs-list] " Xuan Baldauf
2001-06-27 18:16 ` Rik van Riel
2001-06-27 18:38 ` Chris Mason
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=3B3AA2B8.93F9A28C@uow.edu.au \
--to=andrewm@uow.edu.au \
--cc=andrea@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
--cc=mason@suse.com \
--cc=reiserfs-list@namesys.com \
--cc=riel@conectiva.com.br \
--cc=xuan--lkml@baldauf.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®