Skip to contentSkip to conversation

fix uniprocessor lockup in page reclaim

PATCH New Andrew Morton 1 participant 1 message Aug 19, 2002

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix uniprocessor lockup in page reclaim

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.

mm/vmscan.c renamed from mm/vmscan.c~pte-chain-fix +1 -4
@@ -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 [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/