linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: William Lee Irwin III <wli@holomorphy.com>
To: linux-mm@kvack.org
Subject: [miltonm@realtime.net: lock_kiobuf page locking]
Date: Sat, 11 May 2002 09:11:05 -0700	[thread overview]
Message-ID: <20020511161104.GZ15756@holomorphy.com> (raw)

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

Cheers,
Bill

----- Forwarded message from "Milton D. Miller II" <miltonm@realtime.net> -----

Envelope-to: wli@holomorphy.com
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" <miltonm@realtime.net>
To: wli@holomorphy.com
Subject: lock_kiobuf page locking


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

===== memory.c 1.61 vs edited =====
--- 1.61/mm/memory.c	Sat May  4 18:07:03 2002
+++ edited/memory.c	Mon May  6 18:18:19 2002
@@ -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 majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/

                 reply	other threads:[~2002-05-11 16:11 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=20020511161104.GZ15756@holomorphy.com \
    --to=wli@holomorphy.com \
    --cc=linux-mm@kvack.org \
    /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