All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] e2fsprogs - add resource track for e2fsck
@ 2009-05-05  3:12 Ken Chen
  2009-05-28 13:37 ` Theodore Tso
  0 siblings, 1 reply; 2+ messages in thread
From: Ken Chen @ 2009-05-05  3:12 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: linux-ext4

This patch adds individual resource tracking for e2fsck's pass1[b-d] phase.

On ext2, time tracking for pass1 includes both error detection and
specific type of fs fix-up phase (e.g. block referenced by multiple
inodes).  The multi-reference fix-up phase some time take significant
amount of time to complete.  We would like to track time spent in sub
component of pass1 by having a finer granularity during pass1b through
pass1d phase.

Signed-off-by: Ken Chen <kenchen@google.com>


diff --git a/e2fsck/pass1b.c b/e2fsck/pass1b.c
index 809bd7f..008d079 100644
--- a/e2fsck/pass1b.c
+++ b/e2fsck/pass1b.c
@@ -208,6 +208,9 @@ void e2fsck_pass1_dupblocks(
 {
 	ext2_filsys 		fs = ctx->fs;
 	struct problem_context	pctx;
+#ifdef RESOURCE_TRACK
+	struct resource_track	rtrack;
+#endif

 	clear_problem_context(&pctx);

@@ -224,10 +227,39 @@ void e2fsck_pass1_dupblocks(
 	dict_set_allocator(&ino_dict, NULL, inode_dnode_free, NULL);
 	dict_set_allocator(&blk_dict, NULL, block_dnode_free, NULL);

+#ifdef RESOURCE_TRACK
+	init_resource_track(&rtrack, ctx->fs->io);
+#endif
+
 	pass1b(ctx, block_buf);
+
+#ifdef RESOURCE_TRACK
+	if (ctx->options & E2F_OPT_TIME2) {
+		e2fsck_clear_progbar(ctx);
+		print_resource_track("Pass 1b", &rtrack, ctx->fs->io);
+	}
+	init_resource_track(&rtrack, ctx->fs->io);
+#endif
+
 	pass1c(ctx, block_buf);
+
+#ifdef RESOURCE_TRACK
+	if (ctx->options & E2F_OPT_TIME2) {
+		e2fsck_clear_progbar(ctx);
+		print_resource_track("Pass 1c", &rtrack, ctx->fs->io);
+	}
+	init_resource_track(&rtrack, ctx->fs->io);
+#endif
+
 	pass1d(ctx, block_buf);

+#ifdef RESOURCE_TRACK
+	if (ctx->options & E2F_OPT_TIME2) {
+		e2fsck_clear_progbar(ctx);
+		print_resource_track("Pass 1d", &rtrack, ctx->fs->io);
+	}
+#endif
+
 	/*
 	 * Time to free all of the accumulated data structures that we
 	 * don't need anymore.

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

* Re: [patch] e2fsprogs - add resource track for e2fsck
  2009-05-05  3:12 [patch] e2fsprogs - add resource track for e2fsck Ken Chen
@ 2009-05-28 13:37 ` Theodore Tso
  0 siblings, 0 replies; 2+ messages in thread
From: Theodore Tso @ 2009-05-28 13:37 UTC (permalink / raw)
  To: Ken Chen; +Cc: linux-ext4

On Mon, May 04, 2009 at 08:12:30PM -0700, Ken Chen wrote:
> This patch adds individual resource tracking for e2fsck's pass1[b-d] phase.
> 
> On ext2, time tracking for pass1 includes both error detection and
> specific type of fs fix-up phase (e.g. block referenced by multiple
> inodes).  The multi-reference fix-up phase some time take significant
> amount of time to complete.  We would like to track time spent in sub
> component of pass1 by having a finer granularity during pass1b through
> pass1d phase.
> 
> Signed-off-by: Ken Chen <kenchen@google.com>

Thanks, applied.

					- Ted

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

end of thread, other threads:[~2009-05-28 13:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-05  3:12 [patch] e2fsprogs - add resource track for e2fsck Ken Chen
2009-05-28 13:37 ` Theodore Tso

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.