linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [uPATCH] small kswapd improvement ???
@ 1998-03-03 17:05 Rik van Riel
  1998-03-03 19:09 ` Rik van Riel
  1998-03-03 23:54 ` Stephen C. Tweedie
  0 siblings, 2 replies; 10+ messages in thread
From: Rik van Riel @ 1998-03-03 17:05 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Stephen C. Tweedie, Benjamin C.R. LaHaise, linux-mm

Hi,

I remember the 1.1 or 1.2 days when Stephen reworked the
swap code and I played around with a small piece of
vmscan.c. Back then a simple bug was encountered and 'fixed'
by always starting the memory scan at adress 0, which gives
a highly unfair and inefficient aging process.

I think I have 'corrected' the code. Not so much made a
large performance increase, but merely a 'correction' for
the sake of correctness and a small improvement.

Patch attached.

Rik.
+-----------------------------+------------------------------+
| For Linux mm-patches, go to | "I'm busy managing memory.." |
| my homepage (via LinuxHQ).  | H.H.vanRiel@fys.ruu.nl       |
| ...submissions welcome...   | http://www.fys.ruu.nl/~riel/ |
+-----------------------------+------------------------------+

--- linux/mm/vmscan.c.orig	Tue Mar  3 14:57:53 1998
+++ linux/mm/vmscan.c	Tue Mar  3 17:51:22 1998
@@ -333,14 +333,15 @@
 	 * Go through process' page directory.
 	 */
 	address = p->swap_address;
-	p->swap_address = 0;
 
 	/*
 	 * Find the proper vm-area
 	 */
 	vma = find_vma(p->mm, address);
-	if (!vma)
+	if (!vma) {
+		p->swap_address = 0;
 		return 0;
+	}
 	if (address < vma->vm_start)
 		address = vma->vm_start;
 

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

end of thread, other threads:[~1998-03-04 23:27 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-03-03 17:05 [uPATCH] small kswapd improvement ??? Rik van Riel
1998-03-03 19:09 ` Rik van Riel
1998-03-03 23:54 ` Stephen C. Tweedie
1998-03-03 23:59   ` Rik van Riel
1998-03-04  1:17     ` Benjamin C.R. LaHaise
1998-03-04 11:54       ` Rik van Riel
1998-03-04 21:11         ` Stephen C. Tweedie
1998-03-04 23:27           ` Rik van Riel
1998-03-04 14:00     ` Dr. Werner Fink
1998-03-04 15:33       ` Rik van Riel

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