linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Tomas <bzzz.tomas@gmail.com>
To: Eric Sandeen <sandeen@redhat.com>
Cc: Andreas Dilger <adilger@Sun.COM>,
	ext4 development <linux-ext4@vger.kernel.org>
Subject: Re: delalloc fragmenting files?
Date: Sun, 04 Nov 2007 21:36:04 +0300	[thread overview]
Message-ID: <472E1114.7060206@gmail.com> (raw)
In-Reply-To: <472B453F.8010608@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1123 bytes --]

thanks for the data. the attached patch should fix couple issues:
broken history output and policy in that smaller usable chunk to
be used. can you give it a spin, please?

thanks, Alex

Eric Sandeen wrote:
> Alex Tomas wrote:
>> Eric,
>>
>> would you mind to repeat the run and then grab /proc/fs/ext4/<dev>/mb_history?
>>
>> thanks in advance, Alex
> 
> Sure thing, attached; this is from a 1024x1M run, wound up with 32
> fragments, out of order:
> 
> First block: 122880
> Last block: 491519
> Discontinuity: Block 7424 is at 114688 (was 130303)
> Discontinuity: Block 15616 is at 106496 (was 122879)
> Discontinuity: Block 23552 is at 102400 (was 114431)
> Discontinuity: Block 26624 is at 155648 (was 105471)
> Discontinuity: Block 33792 is at 147456 (was 162815)
> Discontinuity: Block 41472 is at 162816 (was 155135)
> Discontinuity: Block 42496 is at 188416 (was 163839)
> Discontinuity: Block 50176 is at 180224 (was 196095)
> Discontinuity: Block 58368 is at 172032 (was 188415)
> Discontinuity: Block 66560 is at 167936 (was 180223)
> ....
> 
> pid 3695 is pdflush, I assume 7634 was the dd itself.
> 
> -Eric


[-- Attachment #2: mballoc-use-smaller-good-chunk.patch --]
[-- Type: text/x-patch, Size: 972 bytes --]

Index: linux-2.6.24-rc1/fs/ext4/mballoc.c
===================================================================
--- linux-2.6.24-rc1.orig/fs/ext4/mballoc.c	2007-10-27 10:29:17.000000000 +0400
+++ linux-2.6.24-rc1/fs/ext4/mballoc.c	2007-11-04 21:30:20.000000000 +0300
@@ -1553,7 +1553,8 @@ static void ext4_mb_measure_extent(struc
 		/* if the request is satisfied, then we try to find
 		 * an extent that still satisfy the request, but is
 		 * smaller than previous one */
-		*bex = *ex;
+		if (ex->fe_len < bex->fe_len)
+			*bex = *ex;
 	}
 
 	ext4_mb_check_limits(ac, e4b, 0);
@@ -2311,6 +2312,11 @@ static void ext4_mb_store_history(struct
 	h.orig = ac->ac_o_ex;
 	h.result = ac->ac_b_ex;
 	h.flags = ac->ac_flags;
+	h.found = ac->ac_found;
+	h.groups = ac->ac_groups_scanned;
+	h.cr = ac->ac_criteria;
+	h.tail = ac->ac_tail;
+	h.buddy = ac->ac_buddy;
 	h.merged = 0;
 	if (ac->ac_op == EXT4_MB_HISTORY_ALLOC) {
 		if (ac->ac_g_ex.fe_start == ac->ac_b_ex.fe_start &&

  reply	other threads:[~2007-11-04 18:38 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-26 21:24 delalloc fragmenting files? Eric Sandeen
2007-10-26 22:19 ` Andreas Dilger
2007-10-27  2:54   ` Eric Sandeen
2007-10-27  3:08     ` Eric Sandeen
2007-10-31 21:01   ` Eric Sandeen
2007-11-01  0:35     ` Alex Tomas
2007-11-01 15:20       ` Eric Sandeen
2007-11-01 19:05         ` Eric Sandeen
2007-11-02  8:56           ` Alex Tomas
2007-11-02 15:41             ` Eric Sandeen
2007-11-04 18:36               ` Alex Tomas [this message]
2007-11-05 17:37                 ` Eric Sandeen
2007-11-05 17:39                   ` Eric Sandeen
2007-11-05 17:45                   ` Alex Tomas
2007-11-05 18:51                   ` Andreas Dilger
2007-11-05 18:54                     ` Eric Sandeen
2007-11-06 19:54                   ` Eric Sandeen
2007-11-07 20:37                     ` Andreas Dilger
2007-11-07 20:53                       ` Eric Sandeen
2007-10-29 19:13 ` Eric Sandeen

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=472E1114.7060206@gmail.com \
    --to=bzzz.tomas@gmail.com \
    --cc=adilger@Sun.COM \
    --cc=linux-ext4@vger.kernel.org \
    --cc=sandeen@redhat.com \
    /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;
as well as URLs for NNTP newsgroup(s).