From: Chris Mason <mason@suse.com>
To: Rik van Riel <riel@conectiva.com.br>
Cc: 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: Wed, 27 Jun 2001 16:52:25 -0400 [thread overview]
Message-ID: <946960000.993675145@tiny> (raw)
In-Reply-To: <Pine.LNX.4.33L.0106271733280.23373-100000@duckman.distro.conectiva>
On Wednesday, June 27, 2001 05:36:45 PM -0300 Rik van Riel
<riel@conectiva.com.br> wrote:
> On Wed, 27 Jun 2001, Chris Mason wrote:
>> On Wednesday, June 27, 2001 04:43:28 PM -0300 Rik van Riel
>
>> > If you don't have free memory, you are limited to 2 choices:
>> >
>> > 1) wait on IO
>> > 2) spin endlessly, wasting CPU until the IO is done
>>
>> Ok, I need to describe the problem a little better. reiserfs
>> inodes need to be logged, which means you have to join/start a
>> transaction in order to write them.
>
>> So, the only time reiserfs_write_inode needs to do something is for fsync
>> and/or O_SYNC writes, and all it needs to do is commit the transaction.
>>
>> Any time kswapd is calling write_inode, it is just trying to
>> free the inode struct, and reiserfs can safely ignore the write
>> request, regardless of if a sync is requested.
>
> OK, sounds sane enough to me ;)
Well, I guess that's one word for it...I'll bet $5 Al's got a few others
;-) A better fix is to have private inode dirty lists....
>
> So the fix is just to let reiserfs_write_inode always be
> asynchronous, independent of its arguments, as long as
> we're not in fsync() or O_SYNC.
I think so, but there needs to be some testing there. Note that I managed
to run a heavy stress test (put my machine far, far into swap) for 3 solid
days without hitting this. When I initially made the dirty_inode kludge, I
could trigger it in ~10 minutes.
>
> OTOH, if we are called synchronously, we could also just
> walk down the code path taken when we _are_ called by
> fsync(), right ?
sorry, not sure what you mean. In fsync we do a commit, which might wait
on the current transaction, so kswapd can't go down that code path.
-chris
next prev parent reply other threads:[~2001-06-27 20:53 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-27 14:27 VM deadlock 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 [this message]
2001-06-28 3:21 ` Andrew Morton
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=946960000.993675145@tiny \
--to=mason@suse.com \
--cc=andrea@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
--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