linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Re: 2.1.91pre2 death by swapping.
       [not found] <19980326034544.27868@jackalz>
@ 1998-03-26 13:00 ` Dr. Werner Fink
  1998-03-26 14:18   ` Rik van Riel
  0 siblings, 1 reply; 2+ messages in thread
From: Dr. Werner Fink @ 1998-03-26 13:00 UTC (permalink / raw)
  To: myrdraal; +Cc: linux-kernel, linux-mm


> 
> Hi,
>  Well, shortly after I wrote my previous message, 2.1.91pre2 died a nasty
>  death. This system has 64mb RAM and was lightly loaded, the main thing
>  it was doing was playing a MOD. It started to swap out of the blue, the
>  mod started skipping more and more, and eventually stopped playing
>  entiredly while the machine thrashed. It continued thrashing for 10-15
>  minutes, every program totally stopped while this was happening. Using
>  the magic sysrq show memory option, I could see that the free pages
>  number was fluctuating between 10200 and 10250 or so. Eventually I rebooted
>  back to 2.1.90 with the magic sysrq.
> -Myrdraal


I've found the following piece of code in the 2.1.91pre2:

--------------------------------------------------------------------------
--- v2.1.90/linux/mm/filemap.c	Tue Mar 10 10:03:36 1998
+++ linux/mm/filemap.c	Wed Mar 25 13:13:36 1998
@@ -150,6 +150,10 @@
 				}
 				tmp = tmp->b_this_page;
 			} while (tmp != bh);
+
+			/* Refuse to swap out all buffer pages */
+			if ((buffermem >> PAGE_SHIFT) * 100 > (buffer_mem.min_percent * num_physpages))
+				goto next;
 		}
 
 		/* We can't throw away shared pages, but we do mark
--------------------------------------------------------------------------

IMHO the `>' should be a `<', shouldn't it?

... and the better place fur such a statement is IMHO
linux/mm/vmscan.c:do_try_to_free_page() which would avoid the shrink_mmap()
and its do-while-loop.


          Werner

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

* Re: 2.1.91pre2 death by swapping.
  1998-03-26 13:00 ` 2.1.91pre2 death by swapping Dr. Werner Fink
@ 1998-03-26 14:18   ` Rik van Riel
  0 siblings, 0 replies; 2+ messages in thread
From: Rik van Riel @ 1998-03-26 14:18 UTC (permalink / raw)
  To: Dr. Werner Fink; +Cc: myrdraal, linux-kernel, linux-mm

On Thu, 26 Mar 1998, Dr. Werner Fink wrote:

> I've found the following piece of code in the 2.1.91pre2:
> 
> +			/* Refuse to swap out all buffer pages */
> +			if ((buffermem >> PAGE_SHIFT) * 100 > (buffer_mem.min_percent * num_physpages))
> +				goto next;
> 
> IMHO the `>' should be a `<', shouldn't it?

Yes, it should.

> .... and the better place fur such a statement is IMHO
> linux/mm/vmscan.c:do_try_to_free_page() which would avoid the shrink_mmap()
> and its do-while-loop.

shrink_mmap() also shrinks page-cache pages, so it needs
to be called. (unless someone changed the pagecache
semantics too :)

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> |
+-------------------------------------------+--------------------------+

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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <19980326034544.27868@jackalz>
1998-03-26 13:00 ` 2.1.91pre2 death by swapping Dr. Werner Fink
1998-03-26 14:18   ` 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