* [miltonm@realtime.net: lock_kiobuf page locking]
@ 2002-05-11 16:11 William Lee Irwin III
0 siblings, 0 replies; only message in thread
From: William Lee Irwin III @ 2002-05-11 16:11 UTC (permalink / raw)
To: linux-mm
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/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-05-11 16:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-11 16:11 [miltonm@realtime.net: lock_kiobuf page locking] William Lee Irwin III
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox