Re: [PATCH 2/3] dio: scale unaligned IO tracking via multiple lists

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jeff Moyer
Date: Thursday, November 11, 2010 - 8:32 am

Dave Chinner <david@fromorbit.com> writes:


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);
}

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[REPOST, PATCH 0/3] dio: serialise unaligned direct IO, Dave Chinner, (Mon Nov 8, 12:40 am)
Re: [PATCH 2/3] dio: scale unaligned IO tracking via multi ..., Jeff Moyer, (Thu Nov 11, 8:32 am)