From: Martin Diehl <mdiehlcs@compuserve.de>
To: Rik van Riel <riel@conectiva.com.br>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [patch *] VM deadlock fix
Date: Fri, 22 Sep 2000 14:16:54 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.10.10009221159321.8135-100000@notebook.diehl.home> (raw)
In-Reply-To: <Pine.LNX.4.21.0009211340110.18809-100000@duckman.distro.conectiva>
On Thu, 21 Sep 2000, Rik van Riel wrote:
> I've found and fixed the deadlocks in the new VM. They turned out
> to be single-cpu only bugs, which explains why they didn't crash my
> SMP tesnt box ;)
Hi,
tried
> http://www.surriel.com/patches/2.4.0-t9p2-vmpatch
applied to 2.4.0-t9p4 on UP box booted with mem=8M.
The deadlock behaviour appears to be somehow different compared
to vanilla 2.4.0-t9p4 - however, for me it makes things even worse:
I booted into singleuser and used
dd if=/dev/urandom of=/dev/null count=1 bs=x
to trigger the issue by increasing bs-values. As soon as bs is big
enough to force swapping (about 3M in my case) the box "deadlocks".
What has become worse is, that SysRq+e (or k) doesn't help anymore
with this patch applied. So I had to SysRq+b and ended fscking (but
no fs-corruption). Without the patch this was not a problem.
Some more points I've notized:
* apparently, the deadlock happens when the box begins to swap. I never
found any used swapspace with the new VM from 2.4.0-t9p*. If memory
requests force the use of swapspace, the machine deadlocks.
* when, after deadlocking, I pressed SysRq+t several times I found
- either dd or kswapd being current task in vanilla 2.4.0-t9p4
- neither dd nor kswapd ever being current with this patch
* as an printk() in the main loop shows, kreclaimd *never* awoke
* My impression was similar to what somebody has already reported:
seems something related to refill_inactive_scan() is recursing to
infinity when the "deadlock" happens.
* the behaviour of kswapd without this last patch differs significantly
before and after the first deadlock happens (and released by SysRq+e):
only *after* pressing SysRq+e (or k) kswapd awoke once per second
on the idle box. This is strange since it should sleep with timeout=HZ
in its main loop.
Especially the last point suggests to me there might be a problem at
initialization. I'm not sure, whether everything called from kswapd
is properly initialized at the time when the kswapd-thread is created.
To check this, I've tentatively added an additional
interruptible_sleep_on_timeout() before kswapd's main loop to delay it
until initialization has finished. Probably it would be more "Right" to
move the sleep from the end of the main loop to its beginning - however,
I just tried a quick hack and did not check if the *_shortage() stuff is
ready to be called at init time.
The additional sleep before kswapd enters its main loop was a major
improvement for me:
* my dd-tests did not deadlock anymore - even with bs=100M and mem=8M
* swap space was really used now.
* i was able to advance beyond singleuser with 2.4.0-t9p* and mem=8M
for the very first time (always deadlocked in the init-scripts)
* i was even able to make bzImage - but it dumped core after about 15 Min
for unknown reason (probably out of memory) but without any deadlock.
Box was at av. load 3 and 15M swap used at this time.
* I found kreclaimd *was* awoken several times.
* however, kswapd still not awaking every second after fresh boot. Now
it begins to awake as soon as real swapping starts.
So, my conclusion is the "deadlock" issue might be mainly an
initialization problem. Probably some more special handling is needed
at swapon later. Currently my guess is there is a initialization problem
when kswapd starts and some kind of blocking when refill_inactive_scan()
is called before swapon.
Comments?
Will do some more tests (including your latest patch).
Regards
Martin
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
prev parent reply other threads:[~2000-09-22 12:16 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-09-21 16:44 Rik van Riel
2000-09-21 20:28 ` Roger Larsson
2000-09-21 23:31 ` Problem remains - page_launder? (Was: Re: [patch *] VM deadlock fix) Roger Larsson
2000-09-21 22:23 ` [patch *] VM deadlock fix David S. Miller
2000-09-22 0:18 ` Andrea Arcangeli
2000-09-21 23:57 ` David S. Miller
2000-09-22 8:39 ` Rik van Riel
2000-09-22 8:54 ` test9-pre5+t9p2-vmpatch VM deadlock during write-intensive workload Molnar Ingo
2000-09-22 9:00 ` Molnar Ingo
2000-09-22 9:08 ` Rik van Riel
2000-09-22 9:14 ` Molnar Ingo
2000-09-22 9:34 ` Molnar Ingo
2000-09-22 10:27 ` Rik van Riel
2000-09-22 13:10 ` André Dahlqvist
2000-09-22 14:10 ` André Dahlqvist
2000-09-22 16:38 ` test9-pre3+t9p2-vmpatch VM deadlock during socket I/O Yuri Pudgorodsky
2000-09-22 16:20 ` test9-pre5+t9p2-vmpatch VM deadlock during write-intensive workload Mohammad A. Haque
2000-09-22 17:39 ` Linus Torvalds
2000-09-25 13:47 ` Rik van Riel
2000-09-22 12:16 ` Martin Diehl [this message]
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=Pine.LNX.4.10.10009221159321.8135-100000@notebook.diehl.home \
--to=mdiehlcs@compuserve.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=riel@conectiva.com.br \
/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