It's still surprising to me that the database log wasn't preallocated.
Perhaps they just use fallocate, now.
Yeah, I can't believe I missed that. FWIW, I was told was that the
database log needs to force out commits of various sizes, so it can't
always issue a fixed sized/aligned I/O. Anyway, I'll have them re-run
the test with the attached script. Thanks for pointing out this obvious
stupidity. ;-)
Dave, can you CC me and akpm on your next patch posting? The dio
changes typically trickle in through Andrew's tree.
Cheers,
Jeff
#! /usr/bin/env stap
#
# This file is free software. You can redistribute it and/or modify it under
# the terms of the GNU General Public License (GPL); either version 2, or (at
# your option) any later version.
global zeroes = 0
global start_time = 0
probe kernel.function("dio_zero_block") {
BH_New = 1 << 6;
dio_blocks_per_fs_block = 1 << $dio->blkfactor;
this_chunk_blocks = $dio->block_in_file & (dio_blocks_per_fs_block - 1);
if ($dio->blkfactor != 0 && !($dio->map_bh->b_state & BH_New) &&
this_chunk_blocks != 0) {
zeroes++;
}
}
probe begin {
start_time=gettimeofday_s();
}
probe end {
printf("%d zeroes performed in %d seconds\n", zeroes, gettimeofday_s() - start_time);
}
--