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
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 &&