Skip to contentSkip to conversation

test9: another vm lockup bug - squashed

PATCH New Roger Larsson 1 participant 1 message Oct 5, 2000

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

PATCH 1/1 test9: another vm lockup bug - squashed

Hi,

This is applicable on Riels latest addition. (freepages v. zone->"limit")
That is probably not needed, and you should be able to change your limits with this patch.

This patch adds equality check in several comparisons.

It is strictly only the one in __alloc_pages_limit that is needed, it interacts with the test in free_shortage. Without this patch you get stuck on exactly zone->pages_min. Too few pages to alloc and too many to free...

Ying Chen has reported that this patch cures his problem.

/RogerL

--
Home page:
http://www.norran.net/nra02596/

mm/page_alloc.c renamed from mm/page_alloc.c.orig +3 -3
@@ -268,7 +268,7 @@ static struct page * __alloc_pages_limit
 				water_mark = z->pages_high;
 		}
 
-		if (z->free_pages + z->inactive_clean_pages > water_mark) {
+		if (z->free_pages + z->inactive_clean_pages >= water_mark) {
 			struct page *page = NULL;
 			/* If possible, reclaim a page directly. */
 			if (direct_reclaim && z->free_pages < z->pages_min + 8)
@@ -329,7 +329,7 @@ struct page * __alloc_pages(zonelist_t *
 	 * wake up bdflush.
 	 */
 	else if (free_shortage() && nr_inactive_dirty_pages > free_shortage()
-			&& nr_inactive_dirty_pages > freepages.high)
+			&& nr_inactive_dirty_pages >= freepages.high)
 		wakeup_bdflush(0);
 
 try_again:
@@ -347,7 +347,7 @@ try_again:
 		if (!z->size)
 			BUG();
 
-		if (z->free_pages > z->pages_low) {
+		if (z->free_pages >= z->pages_low) {
 			page = rmqueue(z, order);
 			if (page)
 				return page;