Message ID | 1361273843-16094-1-git-send-email-dmonakhov@openvz.org |
---|---|
State | Not Applicable, archived |
Headers | show |
On Tue, Feb 19, 2013 at 03:37:13PM +0400, Dmitry Monakhov wrote: > FIO is very flexible io generator, I would call it IO swiss knife. > Currently we have tonns of hardcoded application which reproduces > some predefined scenario. This approach has obvious dissadvantages > 1) Lack of flexability: one written it is hard to modify it in future > 2) Code base is large, many routines written again and again > > At the same time add new fio based tast is just add simle INI file. > This greatly simplify code review. I do beleve that some day we will > replace most of hardcoded io binaries with fio. > > One who is planning to run $FIO_PROG should first check that system > contains appropriate version which is able to handle jobfile > for example: _require_fio 286-job.fio > > Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> Hi Dimitry, Can you rebase this series on top of a current xfstests tree? It doesn't apply without conflicts or trying to land on top of existing files, so that makes it hard to actually test and do a final review on.... Cheers, Dave.
On Wed, 20 Feb 2013 12:19:21 +1100, Dave Chinner <david@fromorbit.com> wrote: > On Tue, Feb 19, 2013 at 03:37:13PM +0400, Dmitry Monakhov wrote: > > FIO is very flexible io generator, I would call it IO swiss knife. > > Currently we have tonns of hardcoded application which reproduces > > some predefined scenario. This approach has obvious dissadvantages > > 1) Lack of flexability: one written it is hard to modify it in future > > 2) Code base is large, many routines written again and again > > > > At the same time add new fio based tast is just add simle INI file. > > This greatly simplify code review. I do beleve that some day we will > > replace most of hardcoded io binaries with fio. > > > > One who is planning to run $FIO_PROG should first check that system > > contains appropriate version which is able to handle jobfile > > for example: _require_fio 286-job.fio > > > > Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> > > Hi Dimitry, > > Can you rebase this series on top of a current xfstests tree? It Ohhh. I use git://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git > doesn't apply without conflicts or trying to land on top of existing > files, so that makes it hard to actually test and do a final review > on.... Will do ASAP. > > Cheers, > > Dave. > -- > Dave Chinner > david@fromorbit.com -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/common.config b/common.config index 7bed1c5..d5c8956 100644 --- a/common.config +++ b/common.config @@ -158,6 +158,7 @@ export XFS_QUOTA_PROG="`set_prog_path xfs_quota`" export KILLALL_PROG="`set_prog_path killall`" export INDENT_PROG="`set_prog_path indent`" export XFS_COPY_PROG="`set_prog_path xfs_copy`" +export FIO_PROG="`set_prog_path fio`" # Generate a comparable xfsprogs version number in the form of # major * 10000 + minor * 100 + release diff --git a/common.rc b/common.rc index 602513a..f5027e7 100644 --- a/common.rc +++ b/common.rc @@ -1758,6 +1758,21 @@ _require_btrfs() [ $? -eq 0 ] || _notrun "$BTRFS_UTIL_PROG too old (must support $cmd)" } +# Check that fio is present, and it is able to execute given jobfile +_require_fio() +{ + job=$1 + + _require_command $FIO_PROG + if [ -z "$1" ]; then + return 1; + fi + + $FIO_PROG --warnings-fatal --showcmd $job >/dev/null 2>&1 + [ $? -eq 0 ] || _notrun "$FIO_PROG too old" +} + + # arg 1 is dev to remove and is output of the below eg. # ls -l /sys/class/block/sdd | rev | cut -d "/" -f 3 | rev _devmgt_remove()
FIO is very flexible io generator, I would call it IO swiss knife. Currently we have tonns of hardcoded application which reproduces some predefined scenario. This approach has obvious dissadvantages 1) Lack of flexability: one written it is hard to modify it in future 2) Code base is large, many routines written again and again At the same time add new fio based tast is just add simle INI file. This greatly simplify code review. I do beleve that some day we will replace most of hardcoded io binaries with fio. One who is planning to run $FIO_PROG should first check that system contains appropriate version which is able to handle jobfile for example: _require_fio 286-job.fio Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> --- common.config | 1 + common.rc | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 0 deletions(-)