linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kanoj-mm2.0-2.2.9 unneccesary page force in by munlock
@ 1999-05-17  4:02 Kanoj Sarcar
  1999-05-17  4:48 ` Linus Torvalds
  0 siblings, 1 reply; 5+ messages in thread
From: Kanoj Sarcar @ 1999-05-17  4:02 UTC (permalink / raw)
  To: Linux-MM; +Cc: torvalds, number6

While looking at the code for munlock() in mm/mlock.c, I found
that munlock() unneccesarily executes a code path that forces
page fault in over the entire range. The following patch fixes 
this problem:

--- /usr/tmp/p_rdiff_a007Qs/mlock.c     Sun May 16 20:48:12 1999
+++ mm/mlock.c  Sun May 16 20:47:01 1999
@@ -117,8 +117,9 @@
                pages = (end - start) >> PAGE_SHIFT;
                if (!(newflags & VM_LOCKED))
                        pages = -pages;
+               else
+                       make_pages_present(start, end);
                vma->vm_mm->locked_vm += pages;
-               make_pages_present(start, end);
        }
        return retval;
 }

Please review and include in the source.

Thanks.

Kanoj
kanoj@engr.sgi.com
--
To unsubscribe, send a message with 'unsubscribe linux-mm my@address'
in the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1999-05-17 17:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-05-17  4:02 [PATCH] kanoj-mm2.0-2.2.9 unneccesary page force in by munlock Kanoj Sarcar
1999-05-17  4:48 ` Linus Torvalds
1999-05-17  6:16   ` Kanoj Sarcar
1999-05-17 16:11     ` Linus Torvalds
1999-05-17 17:31       ` Kanoj Sarcar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox