From: Andrew Morton <akpm@zip.com.au>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: [patch] fix uniprocessor lockup in page reclaim
Date: Sun, 18 Aug 2002 19:51:34 -0700 [thread overview]
Message-ID: <3D605D36.CEB8A088@zip.com.au> (raw)
I have a test_and_set_bit(PG_chainlock, page->flags) in page reclaim. Which
works fine on SMP. But on uniprocessor, we made pte_chain_unlock() a no-op,
so all pages end up with PG_chainlock set. refill_inactive() cannot move any
pages onto the inactive list and the machine dies.
The patch removes the test_and_set_bit optimisation in there and just uses
pte_chain_lock(). If we want that (dubious) optimisation back then let's do
it right and create pte_chain_trylock().
Patch is against recent 2.5.31+BK. Please include for 2.5.32.
--- 2.5.31/mm/vmscan.c~pte-chain-fix Sun Aug 18 19:38:15 2002
+++ 2.5.31-akpm/mm/vmscan.c Sun Aug 18 19:38:37 2002
@@ -398,10 +398,7 @@ static /* inline */ void refill_inactive
page = list_entry(l_hold.prev, struct page, lru);
list_del(&page->lru);
if (page->pte.chain) {
- if (test_and_set_bit(PG_chainlock, &page->flags)) {
- list_add(&page->lru, &l_active);
- continue;
- }
+ pte_chain_lock(page);
if (page->pte.chain && page_referenced(page)) {
pte_chain_unlock(page);
list_add(&page->lru, &l_active);
.
--
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-mm.org/
reply other threads:[~2002-08-19 2:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=3D605D36.CEB8A088@zip.com.au \
--to=akpm@zip.com.au \
--cc=linux-mm@kvack.org \
--cc=torvalds@transmeta.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.