Skip to contentSkip to conversation

[[email protected]: lock_kiobuf page locking]

[email protected]: lock_kiobuf page locking William Lee Irwin III 1 participant 1 message May 11, 2002

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

This looks good to me; thought I'd toss it out here for review.

Cheers,
Bill

----- Forwarded message from "Milton D. Miller II" <[email protected]> -----

Envelope-to: [email protected]
Delivery-date: Mon, 06 May 2002 21:44:36 -0700
Date: Mon, 6 May 2002 23:45:47 -0500 (CDT)
From: "Milton D. Miller II" <[email protected]>
To: [email protected]
Subject: lock_kiobuf page locking

Just noticed this with the wait_page to wait_page_locked diff ...

===== memory.c 1.61 vs edited =====

memory.c renamed from mm/memory.c +9 -4
@@ -693,8 +693,8 @@
 {
 	struct kiobuf *iobuf;
 	int i, j;
-	struct page *page, **ppage;
-	int doublepage = 0;
+	struct page *page, **ppage, *dpage = NULL;
+	int doublepage;
 	int repeat = 0;
 	
  repeat:
@@ -747,9 +747,14 @@
 		 * but if it happens more than once, chances
 		 * are we have a double-mapped page. 
 		 */
-		if (++doublepage >= 3) 
-			return -EINVAL;
+		if (dpage != page) {
+			dpage = page;
+			doublepage = 0;
+		} else {
+			if (++doublepage >= 3)
+				return -EINVAL;
 		
+	} else {
 		/* Try again...  */
 		wait_on_page_locked(page);
 	}

----- End forwarded message -----
--
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/