linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] linux-2.1.91-pre2 crash fixed
@ 1998-03-26 14:08 Rik van Riel
  1998-03-26 14:44 ` Dr. Werner Fink
  0 siblings, 1 reply; 2+ messages in thread
From: Rik van Riel @ 1998-03-26 14:08 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel, linux-mm

Hi Linus,

I've found a small typo in mm/filemap.c, which prevented
proper operation of the VM subsystem and, in effect, threw
kswapd in a loop.

In effect, it refused to free buffer memory when it was
_above_ the minimum percentage :)

Rik.
+-------------------------------------------+--------------------------+
| Linux: - LinuxHQ MM-patches page          | Scouting       webmaster |
|        - kswapd ask-him & complain-to guy | Vries    cubscout leader |
|     http://www.fys.ruu.nl/~riel/          | <H.H.vanRiel@fys.ruu.nl> |
+-------------------------------------------+--------------------------+

--- linux/mm/filemap.c.pre91-2	Thu Mar 26 15:03:44 1998
+++ linux/mm/filemap.c	Thu Mar 26 15:04:25 1998
@@ -152,7 +152,7 @@
 			} while (tmp != bh);
 
 			/* Refuse to swap out all buffer pages */
-			if ((buffermem >> PAGE_SHIFT) * 100 > (buffer_mem.min_percent * num_physpages))
+			if ((buffermem >> PAGE_SHIFT) * 100 < (buffer_mem.min_percent * num_physpages))
 				goto next;
 		}
 

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

* Re: [PATCH] linux-2.1.91-pre2 crash fixed
  1998-03-26 14:08 [PATCH] linux-2.1.91-pre2 crash fixed Rik van Riel
@ 1998-03-26 14:44 ` Dr. Werner Fink
  0 siblings, 0 replies; 2+ messages in thread
From: Dr. Werner Fink @ 1998-03-26 14:44 UTC (permalink / raw)
  To: H.H.vanRiel; +Cc: torvalds, linux-kernel, linux-mm


> I've found a small typo in mm/filemap.c, which prevented
> proper operation of the VM subsystem and, in effect, threw
> kswapd in a loop.
> 
> In effect, it refused to free buffer memory when it was
> _above_ the minimum percentage :)

This small type with its enormous effect I've mentioned a hour ago or so :)


BTW: Rik? I've a simple suggestion for the calculation of the number of
     free pages.  After the last kernel driver has done its allocation
     it would be usefull to remember the number of free pages with
     a global variable num_availpages and use this one instead of
     num_physpages for the most memory management operations.
     This would give a better protection for systems with less amount of
     physical ram to be out of the choosen limits for the VM subsystem.


              Werner

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

end of thread, other threads:[~1998-03-26 14:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-03-26 14:08 [PATCH] linux-2.1.91-pre2 crash fixed Rik van Riel
1998-03-26 14:44 ` Dr. Werner Fink

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