public inbox for linux-fsdevel@vger.kernel.org
 help / color / mirror / Atom feed
From: Olaf Dietsche <olaf+list.linux-kernel@olafdietsche.de>
To: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: [PATCH][RFC] speeding up fsck -A
Date: Mon, 21 Jul 2003 01:01:44 +0200	[thread overview]
Message-ID: <87adb8dcpz.fsf@goat.bogus.local> (raw)

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;

             reply	other threads:[~2003-07-20 22:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-20 23:01 Olaf Dietsche [this message]
2003-07-22  1:04 ` [PATCH][RFC] speeding up fsck -A Theodore Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87adb8dcpz.fsf@goat.bogus.local \
    --to=olaf+list.linux-kernel@olafdietsche.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox