lkml.org 
[lkml]   [1998]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] krflushd
Applying the patch makes it possible to get rid of bdflush/update [0]
The process is renamed to krflushd so in your init script, after mounting
/proc, you can write something:

if [ `pidof krflushd` ]
then
kill -KILL `pidof "update (bdflush)"`
fi

[0] (unless, of course, you use it for things like spinning down)
--
____/| Ragnar Hojland (ragnar@lightside.ddns.org) Fingerprint 94C4B
\ o.O| 2F0D27DE025BE2302C
=(_)= "Thou shalt not follow the NULL pointer for 104B78C56 B72F0822
U chaos and madness await thee at its end." hkp://keys.pgp.com


--- linux-2.1.126/fs/buffer.c.O Wed Oct 28 18:46:21 1998
+++ linux-2.1.126/fs/buffer.c Wed Oct 28 19:35:52 1998
@@ -63,6 +63,8 @@ static char buffersize_index[65] =
#define MAX_UNUSED_BUFFERS NR_RESERVED+20 /* don't ever have more than this
number of unused buffer heads */

+extern int regular_sync_scheduled;
+
/*
* Hash table mask..
*/
@@ -1944,7 +1946,7 @@ int bdflush(void * unused)

current->session = 1;
current->pgrp = 1;
- sprintf(current->comm, "kflushd");
+ sprintf(current->comm, "krflushd");
bdflush_tsk = current;

/*
@@ -1956,11 +1958,19 @@ int bdflush(void * unused)

for (;;) {
#ifdef DEBUG
- printk("bdflush() activated...");
+ printk("bdflush() activated...\n");
#endif

CHECK_EMERGENCY_SYNC

+ if (regular_sync_scheduled) {
+#ifdef DEBUG
+ printk (KERN_DEBUG "kflushd: sync\n");
+#endif
+ regular_sync_scheduled = 0;
+ fsync_dev(0);
+ }
+
ncount = 0;
#ifdef DEBUG
for(nlist = 0; nlist < NR_LIST; nlist++)
--- linux-2.1.126/mm/vmscan.c.O Wed Oct 28 17:09:51 1998
+++ linux-2.1.126/mm/vmscan.c Wed Oct 28 19:26:50 1998
@@ -7,6 +7,7 @@
* kswapd added: 7.1.96 sct
* Removed kswapd_ctl limits, and swap out as many pages as needed
* to bring the system back to freepages.high: 2.4.97, Rik van Riel.
+ * Added sync_interval, Ragnar Hojland Espinosa
* Version: $Id: vmscan.c,v 1.5 1998/02/23 22:14:28 sct Exp $
*/

@@ -40,6 +41,18 @@ static unsigned long next_swap_jiffies =
int swapout_interval = HZ / 4;

/*
+ * How often do we sync?
+ * Default is every 30 seconds.
+ */
+int sync_interval = HZ * 30;
+
+/*
+ * Flag so bdflush knows when to sync
+ */
+int regular_sync_scheduled = 0;
+void wakeup_bdflush (int);
+
+/*
* The wait queue for waking up the pageout daemon:
*/
struct wait_queue * kswapd_wait = NULL;
@@ -655,6 +668,13 @@ void swap_tick(void)
kswapd_wakeup();
}
}
+
+ /* Sync */
+ if (now % sync_interval == 0) {
+ regular_sync_scheduled = 1;
+ wakeup_bdflush(0);
+ }
+
timer_active |= (1<<SWAP_TIMER);
}


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:45    [W:0.064 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site