linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][RFC] speeding up fsck -A
@ 2003-07-20 23:01 Olaf Dietsche
  2003-07-22  1:04 ` Theodore Ts'o
  0 siblings, 1 reply; 2+ messages in thread
From: Olaf Dietsche @ 2003-07-20 23:01 UTC (permalink / raw)
  To: linux-kernel, linux-fsdevel

With this patch, I get a speedup of about 60%. During boot time it is
even more. Can someone please tell me, why and when this WNOHANG was
introduced. fsck seems to work fine without it.

You will probably gain nothing on SMP, because it doesn't hurt when
fsck hogs one CPU and the real fsck.ext2 does the main work on
another CPU.

This is on Debian unstable and kernel 2.5.72.

Regards, Olaf.

--- e2fsprogs/misc/fsck.c.orig	Wed Apr 16 22:13:56 2003
+++ e2fsprogs/misc/fsck.c	Sun Jul 20 23:35:03 2003
@@ -105,6 +105,7 @@
 int parallel_root = 0;
 int progress = 0;
 int force_all_parallel = 0;
+int no_busy_waiting = 0;
 int num_running = 0;
 int max_running = 0;
 volatile int cancel_requested = 0;
@@ -1007,7 +1008,8 @@
 			break;
 		if (verbose > 1)
 			printf(_("--waiting-- (pass %d)\n"), passno);
-		status |= wait_all(pass_done ? 0 : WNOHANG);
+		status |= wait_all((pass_done || no_busy_waiting) ? 0 : WNOHANG);
+
 		if (pass_done) {
 			if (verbose > 1) 
 				printf("----------------------------------\n");
@@ -1153,6 +1155,9 @@
 				fstype = string_copy(tmp);
 				compile_fs_type(fstype, &fs_type_compiled);
 				goto next_arg;
+			case 'X':
+				no_busy_waiting++;
+				break;
 			case '-':
 				opts_for_fsck++;
 				break;

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

end of thread, other threads:[~2003-07-22  1:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-20 23:01 [PATCH][RFC] speeding up fsck -A Olaf Dietsche
2003-07-22  1:04 ` Theodore Ts'o

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).