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: Thu, 01 Nov 2007 03:35:46 +0300 [thread overview]
Message-ID: <47291F62.3000008@gmail.com> (raw)
In-Reply-To: <4728ED3B.1060407@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 600 bytes --]
please, try the patch attached.
thanks, Alex
Eric Sandeen wrote:
> One thing that seems to be happening is that thanks to delalloc, a nice
> big request is coming in (only 1036 blocks of the 4096, not quite sure
> why), but then it gets into ext4_mb_normalize_request(), which finds the
> most blocks it can "preallocate" is 256, and chops down the request to
> 256 blocks. Shouldn't this preallocation be over & above what was asked
> for, vs. reducing the request?
>
> Ok, so, we get allocations in 256-block chunks... Why they don't all
> come out contiguous, I don't know yet...
>
> -Eric
[-- Attachment #2: mballoc-debug.patch --]
[-- Type: text/x-patch, Size: 901 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-10-27 22:14:54.000000000 +0400
@@ -3088,8 +3088,10 @@ static void ext4_mb_normalize_request(st
break;
}
}
+ size = wind;
+
if (wind == 0) {
- __u64 tstart;
+ __u64 tstart, tend;
/* file is quite large, we now preallocate with
* the biggest configured window with regart to
* logical offset */
@@ -3097,8 +3099,11 @@ static void ext4_mb_normalize_request(st
tstart = ac->ac_o_ex.fe_logical;
do_div(tstart, wind);
start = tstart * wind;
+ tend = ac->ac_o_ex.fe_logical + ac->ac_o_ex.fe_len - 1;
+ do_div(tend, wind);
+ tend = tend * wind + wind;
+ size = tend - start;
}
- size = wind;
orig_size = size;
orig_start = start;
next prev parent reply other threads:[~2007-11-01 0:36 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 [this message]
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
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=47291F62.3000008@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 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.