patch-1.3.58 linux/mm/vmscan.c

Next file: linux/net/Config.in
Previous file: linux/mm/swap.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.57/linux/mm/vmscan.c linux/mm/vmscan.c
@@ -3,7 +3,9 @@
  *
  *  Copyright (C) 1991, 1992, 1993, 1994  Linus Torvalds
  *
- *  Swap reorganised 29.12.95, 
+ *  Swap reorganised 29.12.95, Stephen Tweedie.
+ *  kswapd added: 7.1.96  sct
+ *  Version: $Id: vmscan.c,v 1.3.2.3 1996/01/17 02:43:11 linux Exp $
  */
 
 #include <linux/mm.h>
@@ -357,6 +359,7 @@
 int kswapd(void *unused)
 {
 	int i;
+	char *revision="$Revision: 1.3.2.3 $", *s, *e;
 	
 	current->session = 1;
 	current->pgrp = 1;
@@ -380,15 +383,21 @@
 				    namings for POSIX.4 realtime scheduling
 				    priorities.  */
 
-	printk ("Started kswapd v$Revision: 1.1.2.3 $\n");
 	init_swap_timer();
 	
+	if ((s = strchr(revision, ':')) &&
+	    (e = strchr(s, '$')))
+		s++, i = e - s;
+	else
+		s = revision, i = -1;
+	printk ("Started kswapd v%.*s\n", i, s);
+
 	while (1) {
 		kswapd_awake = 0;
 		current->signal = 0;
 		interruptible_sleep_on(&kswapd_wait);
 		kswapd_awake = 1;
-		
+		swapstats.wakeups++;
 		/* Do the background pageout: */
 		for (i=0; i < kswapd_ctl.maxpages; i++)
 			try_to_free_page(GFP_KERNEL, ~0UL);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this