linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] e2fsprogs: don't set stripe/stride to 1 block in mkfs
@ 2011-04-04 19:11 Eric Sandeen
  2011-04-05  8:10 ` Andreas Dilger
  2011-05-18 17:20 ` Ted Ts'o
  0 siblings, 2 replies; 11+ messages in thread
From: Eric Sandeen @ 2011-04-04 19:11 UTC (permalink / raw)
  To: ext4 development; +Cc: Zeev Tarantov

Block devices may set minimum or optimal IO hints equal to
blocksize; in this case there is really nothing for ext4
to do with this information (i.e. search for a block-aligned
allocation?) so don't set fs geometry with single-block
values.

Zeev also reported that with a block-sized stripe, the
ext4 allocator spends time spinning in ext4_mb_scan_aligned(),
oddly enough.

Reported-by: Zeev Tarantov <zeev.tarantov@gmail.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index 9798b88..74b838c 100644
--- a/misc/mke2fs.c
+++ b/misc/mke2fs.c
@@ -1135,8 +1135,11 @@ static int get_device_geometry(const char *file,
 	if ((opt_io == 0) && (psector_size > blocksize))
 		opt_io = psector_size;
 
-	fs_param->s_raid_stride = min_io / blocksize;
-	fs_param->s_raid_stripe_width = opt_io / blocksize;
+	/* setting stripe/stride to blocksize is pointless */
+	if (min_io > blocksize)
+		fs_param->s_raid_stride = min_io / blocksize;
+	if (opt_io > blocksize)
+		fs_param->s_raid_stripe_width = opt_io / blocksize;
 
 	rc = blkid_topology_get_alignment_offset(tp);
 out:


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

end of thread, other threads:[~2011-05-18 17:20 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-04 19:11 [PATCH] e2fsprogs: don't set stripe/stride to 1 block in mkfs Eric Sandeen
2011-04-05  8:10 ` Andreas Dilger
2011-04-05  8:43   ` Zeev Tarantov
2011-04-05 16:39   ` Eric Sandeen
2011-04-05 16:56     ` Eric Sandeen
2011-04-05 22:21       ` Eric Sandeen
2011-04-06  6:51         ` Zeev Tarantov
2011-04-06 17:00           ` Eric Sandeen
2011-04-08  0:13       ` Andreas Dilger
2011-04-08  0:24         ` Eric Sandeen
2011-05-18 17:20 ` Ted 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).