Skip to contentSkip to conversation

2.1.91pre2 death by swapping.

DISCUSSION Dr. Werner Fink 2 participants 2 messages Mar 26, 1998 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 19980326034544.27868@jackalz

#1 lore raw
Quoted 13 lines

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:

--------------------------------------------------------------------------

mm/filemap.c renamed from linux/mm/filemap.c +4 -0
@@ -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

#2 lore raw
Quoted 7 lines · Dr. Werner Fink

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

mm/filemap.c renamed from linux/mm/filemap.c +3 -0
+			/* 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.

Quoted 3 lines

.... 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/          | <[email protected]> |
+-------------------------------------------+--------------------------+