Message ID | 1348428276-13161-1-git-send-email-dmonakhov@openvz.org |
---|---|
State | Not Applicable, archived |
Headers | show |
On 9/23/12 2:24 PM, Dmitry Monakhov wrote: > FIO is very flexible io generator, i would call it IO swiss knife. > Currently we have tonnes of hardcoded application which reproduces > some predefined scenario. This approach has obvious dissadvantages > 1) Lack of flexability: once 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. The submodule approach is interesting, but I wonder - we have quite a few dependencies on other binaries already; what are the pros and cons of creating this as a git submodule vs. simply expecting fio to be installed on the system like any of the other dependencies we have today? (I package fio for Fedora, is it not commonly available on other distros?) -Eric > Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> > --- > .gitmodules | 3 +++ > common.config | 3 +++ > src/Makefile | 8 +++++--- > src/aio-dio-regress/Makefile | 4 ++-- > src/fio | 1 + > 5 files changed, 14 insertions(+), 5 deletions(-) > create mode 100644 .gitmodules > create mode 160000 src/fio > > diff --git a/.gitmodules b/.gitmodules > new file mode 100644 > index 0000000..f0481ea > --- /dev/null > +++ b/.gitmodules > @@ -0,0 +1,3 @@ > +[submodule "src/fio"] > + path = src/fio > + url = git://git.kernel.dk/fio.git > diff --git a/common.config b/common.config > index 7bed1c5..25cddb4 100644 > --- a/common.config > +++ b/common.config > @@ -138,6 +138,9 @@ export DF_PROG="`set_prog_path df`" > [ "$DF_PROG" = "" ] && _fatal "df not found" > [ "$HOSTOS" = "Linux" ] && export DF_PROG="$DF_PROG -T" > > +export FIO_PROG="`set_prog_path $PWD/src/fio/fio`" > +[ "$FIO_PROG" = "" ] && _fatal "fio not found" > + > export XFS_LOGPRINT_PROG="`set_prog_path xfs_logprint`" > export XFS_REPAIR_PROG="`set_prog_path xfs_repair`" > export XFS_CHECK_PROG="`set_prog_path xfs_check`" > diff --git a/src/Makefile b/src/Makefile > index 67250ee..255bdd4 100644 > --- a/src/Makefile > +++ b/src/Makefile > @@ -52,16 +52,18 @@ LLDLIBS += $(LIBGDBM) > endif > > ifeq ($(HAVE_AIO), true) > -SUBDIRS += aio-dio-regress > +SUBDIRS += aio-dio-regress \ > + fio > + > endif > > CFILES = $(TARGETS:=.c) > LDIRT = $(TARGETS) > > > -default: depend $(TARGETS) $(SUBDIRS) > +default: .depend $(TARGETS) $(SUBDIRS) > > -depend: .dep > +.depend: .dep > > include $(BUILDRULES) > > diff --git a/src/aio-dio-regress/Makefile b/src/aio-dio-regress/Makefile > index 79dd55d..fcead9a 100644 > --- a/src/aio-dio-regress/Makefile > +++ b/src/aio-dio-regress/Makefile > @@ -8,9 +8,9 @@ LDIRT = $(TARGETS) > > LLDLIBS = -laio -lpthread > > -default: depend $(TARGETS) > +default: .depend $(TARGETS) > > -depend: .dep > +.depend: .dep > > include $(BUILDRULES) > > diff --git a/src/fio b/src/fio > new file mode 160000 > index 0000000..e12d280 > --- /dev/null > +++ b/src/fio > @@ -0,0 +1 @@ > +Subproject commit e12d2800f811cb64d376cfdaed9a1257f3fa9c99 > -- 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
On Sun, 23 Sep 2012 22:16:57 -0500, Eric Sandeen <sandeen@redhat.com> wrote: > On 9/23/12 2:24 PM, Dmitry Monakhov wrote: > > FIO is very flexible io generator, i would call it IO swiss knife. > > Currently we have tonnes of hardcoded application which reproduces > > some predefined scenario. This approach has obvious dissadvantages > > 1) Lack of flexability: once 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. > > The submodule approach is interesting, but I wonder - we have quite a few > dependencies on other binaries already; what are the pros and cons of creating > this as a git submodule vs. simply expecting fio to be installed on the > system like any of the other dependencies we have today? Pro: P1) allow to specify exact commit as a submodule HEAD this guarantee that we will have known version and functionality regardless to distribution package manager (which are known to be very conservative) P2) Prevent duplicating of source code (fsstress.c/aio-stress.c and etc). If some one want to add new feature to submodule he simply push it to official submodule repo and move submodule HEAD In that both parties(submodule maintainer and project maintainer) will benefit because new features will be available to every submodule user Cons: C1) New dependencies C2) Learn people how to work with submodules I'll not assume (C2) as a serious argument because this is just one more git's command. For most users should just add new option to clone: git clone --recursive git://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git (C1) Is not big deal in case of Fio because we already depends from libaio. (P2) Makes xfstest coverage larger because all new tests which use new submodules functionality will start to work by default (today it silently ignored). As i already told fio is under rapid development Jens Axboe does very good job so (P2) really works for me, new features i need for xfstets was reviewed and accepted by Jens http://git.kernel.dk/?p=fio.git;a=commit;h=8b28bd41375930664a0ff9ff9b101a88ac416ac5 http://git.kernel.dk/?p=fio.git;a=commit;h=9c25d2e3f498707c4fd5a4bb0adf9867ecb17768 http://git.kernel.dk/?p=fio.git;a=commit;h=e615ceafbe3962a35b7a7e06a0c8f4e2c0652c65 > > (I package fio for Fedora, is it not commonly available on other > distros?) > > -Eric > > > Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> > > --- > > .gitmodules | 3 +++ > > common.config | 3 +++ > > src/Makefile | 8 +++++--- > > src/aio-dio-regress/Makefile | 4 ++-- > > src/fio | 1 + > > 5 files changed, 14 insertions(+), 5 deletions(-) > > create mode 100644 .gitmodules > > create mode 160000 src/fio > > > > diff --git a/.gitmodules b/.gitmodules > > new file mode 100644 > > index 0000000..f0481ea > > --- /dev/null > > +++ b/.gitmodules > > @@ -0,0 +1,3 @@ > > +[submodule "src/fio"] > > + path = src/fio > > + url = git://git.kernel.dk/fio.git > > diff --git a/common.config b/common.config > > index 7bed1c5..25cddb4 100644 > > --- a/common.config > > +++ b/common.config > > @@ -138,6 +138,9 @@ export DF_PROG="`set_prog_path df`" > > [ "$DF_PROG" = "" ] && _fatal "df not found" > > [ "$HOSTOS" = "Linux" ] && export DF_PROG="$DF_PROG -T" > > > > +export FIO_PROG="`set_prog_path $PWD/src/fio/fio`" > > +[ "$FIO_PROG" = "" ] && _fatal "fio not found" > > + > > export XFS_LOGPRINT_PROG="`set_prog_path xfs_logprint`" > > export XFS_REPAIR_PROG="`set_prog_path xfs_repair`" > > export XFS_CHECK_PROG="`set_prog_path xfs_check`" > > diff --git a/src/Makefile b/src/Makefile > > index 67250ee..255bdd4 100644 > > --- a/src/Makefile > > +++ b/src/Makefile > > @@ -52,16 +52,18 @@ LLDLIBS += $(LIBGDBM) > > endif > > > > ifeq ($(HAVE_AIO), true) > > -SUBDIRS += aio-dio-regress > > +SUBDIRS += aio-dio-regress \ > > + fio > > + > > endif > > > > CFILES = $(TARGETS:=.c) > > LDIRT = $(TARGETS) > > > > > > -default: depend $(TARGETS) $(SUBDIRS) > > +default: .depend $(TARGETS) $(SUBDIRS) > > > > -depend: .dep > > +.depend: .dep > > > > include $(BUILDRULES) > > > > diff --git a/src/aio-dio-regress/Makefile b/src/aio-dio-regress/Makefile > > index 79dd55d..fcead9a 100644 > > --- a/src/aio-dio-regress/Makefile > > +++ b/src/aio-dio-regress/Makefile > > @@ -8,9 +8,9 @@ LDIRT = $(TARGETS) > > > > LLDLIBS = -laio -lpthread > > > > -default: depend $(TARGETS) > > +default: .depend $(TARGETS) > > > > -depend: .dep > > +.depend: .dep > > > > include $(BUILDRULES) > > > > diff --git a/src/fio b/src/fio > > new file mode 160000 > > index 0000000..e12d280 > > --- /dev/null > > +++ b/src/fio > > @@ -0,0 +1 @@ > > +Subproject commit e12d2800f811cb64d376cfdaed9a1257f3fa9c99 > > > > -- > 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 -- 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
On Mon, Sep 24, 2012 at 02:03:42PM +0400, Dmitry Monakhov wrote: > On Sun, 23 Sep 2012 22:16:57 -0500, Eric Sandeen <sandeen@redhat.com> wrote: > > On 9/23/12 2:24 PM, Dmitry Monakhov wrote: > > > FIO is very flexible io generator, i would call it IO swiss knife. > > > Currently we have tonnes of hardcoded application which reproduces > > > some predefined scenario. This approach has obvious dissadvantages > > > 1) Lack of flexability: once 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. > > > > The submodule approach is interesting, but I wonder - we have quite a few > > dependencies on other binaries already; what are the pros and cons of creating > > this as a git submodule vs. simply expecting fio to be installed on the > > system like any of the other dependencies we have today? > Pro: > P1) allow to specify exact commit as a submodule HEAD this guarantee > that we will have known version and functionality regardless to > distribution package manager (which are known to be very conservative) You haven't provided a method to do this in this patch. All you've provided is a submodule that tracks the fio tree head. All this needs to be properly documented in the README file, at minimum. And conservative is good, too. I don't want tests to fail because of rapid changes in the fio tree causing regressions in fio itself. The tools that xfstests depends on need to be stable and relatively unchanging, because we're not testing them - we're testing the filesystem. The less the environemnt changes around the things we're actually supposed to be regression testing, the better. > P2) Prevent duplicating of source code (fsstress.c/aio-stress.c and > etc). If some one want to add new feature to submodule he > simply push it to official submodule repo and move submodule HEAD > In that both parties(submodule maintainer and project maintainer) > will benefit because new features will be available to every > submodule user > Cons: > C1) New dependencies > C2) Learn people how to work with submodules > > I'll not assume (C2) as a serious argument because this is just one more > git's command. For most users should just add new option to clone: > git clone --recursive git://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git Doesn't work for me. I keep local mirrors of all git trees that I use regularly and update them by cron jobs so that I don't have to go to the internet for every local tree that I clone or update. That's particularly important for me because I'm a *long* way from the US or Europe and cloning from scratch over the internet takes a long time and suck up a lot of bandwidth. I don't even allow my test machines to access the internet - they only know about the local network and mirrors. I'd have to overide the fio submodule URL in the xfstests repository on every test machine, and that gets messy in a hurry. Also, we distribute xfstests as a tarball, and there has been talk of proper packaging (rpm/deb) as well. In those cases, the git submodule approach does not work as we have to depend on the distro supplied fio packages... > (C1) Is not big deal in case of Fio because we already depends from > libaio. There's also a fio version dependency. i.e. _require_fio has to detect whether the currently installed fio is of sufficiently recent version for the tests to run. > (P2) Makes xfstest coverage larger because all new tests which use new > submodules functionality will start to work by default (today it > silently ignored). As i already told fio is under rapid > development Jens Axboe does very good job so (P2) really works for > me, new features i need for xfstets was reviewed and accepted by Jens > http://git.kernel.dk/?p=fio.git;a=commit;h=8b28bd41375930664a0ff9ff9b101a88ac416ac5 > http://git.kernel.dk/?p=fio.git;a=commit;h=9c25d2e3f498707c4fd5a4bb0adf9867ecb17768 > http://git.kernel.dk/?p=fio.git;a=commit;h=e615ceafbe3962a35b7a7e06a0c8f4e2c0652c65 For me, that's not a "pro" - that's a "con" as i explained above. > > (I package fio for Fedora, is it not commonly available on other > > distros?) Available for Debian, which means all it's derivatives also have it. In short, I'd prefer we continue to use package level dependencies detected through configure/_require_foo infrastructure than using source tree level dependencies. Package level dependencies are much, much easier to manage for most people and don't require everyone to have internet access on the machines that xfstests is being built on.... Cheers, Dave.
On Sun, Sep 23, 2012 at 11:16 PM, Eric Sandeen <sandeen@redhat.com> wrote: > (I package fio for Fedora, is it not commonly available on other > distros?) opensuse has it in the benchmarking repo, but not in the main release repos. If it is getting regular updates and users will want to have the latest version, it makes sense for opensuse to leave it that way. This discussion may change that. As of a year ago, xfstests dependencies could all be met from the main repos. (see howto http://en.opensuse.org/SDB:XFStests) I believe a basic set of xfstests is run as part of the QA process for every factory build (factory is similar to rawhide). At least it was during 12.1 pre-release testing a year ago. http://openqa.opensuse.org/results/ Not a huge deal, but having xfstests tests which depend on fio would either mean opensuse dropping those tests that depend on fio from its routine QA testing, or it would mean adding fio to the main distro. How far into xfstests is fio likely to integrate? If it is to become a core tool and it is not going to be provided by xfstests itself, I can try to submit fio to factory. It will just have to kept new enough to satisfy xfstests version requirements. I do hope that if the distro has to provide a fio package, then xfstests only depend on the version, not the git check-in. Greg -- 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
On Mon, 24 Sep 2012 21:37:18 +1000, Dave Chinner <david@fromorbit.com> wrote: > On Mon, Sep 24, 2012 at 02:03:42PM +0400, Dmitry Monakhov wrote: > > On Sun, 23 Sep 2012 22:16:57 -0500, Eric Sandeen <sandeen@redhat.com> wrote: > > > On 9/23/12 2:24 PM, Dmitry Monakhov wrote: > > > > FIO is very flexible io generator, i would call it IO swiss knife. > > > > Currently we have tonnes of hardcoded application which reproduces > > > > some predefined scenario. This approach has obvious dissadvantages > > > > 1) Lack of flexability: once 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. > > > > > > The submodule approach is interesting, but I wonder - we have quite a few > > > dependencies on other binaries already; what are the pros and cons of creating > > > this as a git submodule vs. simply expecting fio to be installed on the > > > system like any of the other dependencies we have today? > > Pro: > > P1) allow to specify exact commit as a submodule HEAD this guarantee > > that we will have known version and functionality regardless to > > distribution package manager (which are known to be very conservative) > > You haven't provided a method to do this in this patch. All > you've provided is a submodule that tracks the fio tree head. > All this needs to be properly documented in the README file, at > minimum. > > And conservative is good, too. I don't want tests to fail because of > rapid changes in the fio tree causing regressions in fio itself. The > tools that xfstests depends on need to be stable and relatively > unchanging, because we're not testing them - we're testing the > filesystem. The less the environemnt changes around the things we're > actually supposed to be regression testing, the better. Yes, but we do not have to advance submodule update unless we need it. Project may goes forward but we still can use old commit if needed. > > > P2) Prevent duplicating of source code (fsstress.c/aio-stress.c and > > etc). If some one want to add new feature to submodule he > > simply push it to official submodule repo and move submodule HEAD > > In that both parties(submodule maintainer and project maintainer) > > will benefit because new features will be available to every > > submodule user > > Cons: > > C1) New dependencies > > C2) Learn people how to work with submodules > > > > I'll not assume (C2) as a serious argument because this is just one more > > git's command. For most users should just add new option to clone: > > git clone --recursive git://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git > > Doesn't work for me. I keep local mirrors of all git trees that I > use regularly and update them by cron jobs so that I don't have to > go to the internet for every local tree that I clone or update. > > That's particularly important for me because I'm a *long* way from > the US or Europe and cloning from scratch over the internet takes a > long time and suck up a lot of bandwidth. I don't even allow my test > machines to access the internet - they only know about the local > network and mirrors. I'd have to overide the fio submodule URL in > the xfstests repository on every test machine, and that gets messy > in a hurry. > > Also, we distribute xfstests as a tarball, and there has been talk of > proper packaging (rpm/deb) as well. In those cases, the git > submodule approach does not work as we have to depend on the distro > supplied fio packages... Yes, if this is mandatory. it makes packaging harder but not too complex. > > > (C1) Is not big deal in case of Fio because we already depends from > > libaio. > > There's also a fio version dependency. i.e. _require_fio has to > detect whether the currently installed fio is of sufficiently recent > version for the tests to run. > > > (P2) Makes xfstest coverage larger because all new tests which use new > > submodules functionality will start to work by default (today it > > silently ignored). As i already told fio is under rapid > > development Jens Axboe does very good job so (P2) really works for > > me, new features i need for xfstets was reviewed and accepted by Jens > > http://git.kernel.dk/?p=fio.git;a=commit;h=8b28bd41375930664a0ff9ff9b101a88ac416ac5 > > http://git.kernel.dk/?p=fio.git;a=commit;h=9c25d2e3f498707c4fd5a4bb0adf9867ecb17768 > > http://git.kernel.dk/?p=fio.git;a=commit;h=e615ceafbe3962a35b7a7e06a0c8f4e2c0652c65 > > For me, that's not a "pro" - that's a "con" as i explained above. > > > > (I package fio for Fedora, is it not commonly available on other > > > distros?) > > Available for Debian, which means all it's derivatives also have it. > > In short, I'd prefer we continue to use package level dependencies > detected through configure/_require_foo infrastructure than using > source tree level dependencies. Package level dependencies are much, > much easier to manage for most people and don't require everyone to > have internet access on the machines that xfstests is being built > on.... Ok i'll go back to _require_fio $VER approach, but it is reasonable to add prep script which will fetch or install all necessary packages so user can explicitly run it if internet is available. > > Cheers, > > Dave. > -- > Dave Chinner > david@fromorbit.com > -- > To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- 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
On Mon, 24 Sep 2012 08:23:04 -0400, Greg Freemyer <greg.freemyer@gmail.com> wrote: > On Sun, Sep 23, 2012 at 11:16 PM, Eric Sandeen <sandeen@redhat.com> wrote: > > (I package fio for Fedora, is it not commonly available on other > > distros?) > > opensuse has it in the benchmarking repo, but not in the main release > repos. If it is getting regular updates and users will want to have > the latest version, it makes sense for opensuse to leave it that way. > This discussion may change that. > > As of a year ago, xfstests dependencies could all be met from the main > repos. (see howto http://en.opensuse.org/SDB:XFStests) > > I believe a basic set of xfstests is run as part of the QA process for > every factory build (factory is similar to rawhide). At least it was > during 12.1 pre-release testing a year ago. > http://openqa.opensuse.org/results/ > > Not a huge deal, but having xfstests tests which depend on fio would > either mean opensuse dropping those tests that depend on fio from its > routine QA testing, or it would mean adding fio to the main distro. > > How far into xfstests is fio likely to integrate? If it is to become > a core tool and it is not going to be provided by xfstests itself, I > can try to submit fio to factory. It will just have to kept new > enough to satisfy xfstests version requirements. As far as i can say fio potentially can replace most of hardcoded regression binaries. > > I do hope that if the distro has to provide a fio package, then > xfstests only depend on the version, not the git check-in. > > Greg > -- > 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 -- 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
On Mon, Sep 24, 2012 at 04:38:00PM +0400, Dmitry Monakhov wrote: > On Mon, 24 Sep 2012 21:37:18 +1000, Dave Chinner <david@fromorbit.com> wrote: > > On Mon, Sep 24, 2012 at 02:03:42PM +0400, Dmitry Monakhov wrote: > > > On Sun, 23 Sep 2012 22:16:57 -0500, Eric Sandeen <sandeen@redhat.com> wrote: > > > > On 9/23/12 2:24 PM, Dmitry Monakhov wrote: > > > > > FIO is very flexible io generator, i would call it IO swiss knife. > > > > > Currently we have tonnes of hardcoded application which reproduces > > > > > some predefined scenario. This approach has obvious dissadvantages > > > > > 1) Lack of flexability: once 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. > > > > > > > > The submodule approach is interesting, but I wonder - we have quite a few > > > > dependencies on other binaries already; what are the pros and cons of creating > > > > this as a git submodule vs. simply expecting fio to be installed on the > > > > system like any of the other dependencies we have today? > > > Pro: > > > P1) allow to specify exact commit as a submodule HEAD this guarantee > > > that we will have known version and functionality regardless to > > > distribution package manager (which are known to be very conservative) > > > > You haven't provided a method to do this in this patch. All > > you've provided is a submodule that tracks the fio tree head. > > All this needs to be properly documented in the README file, at > > minimum. > > > > And conservative is good, too. I don't want tests to fail because of > > rapid changes in the fio tree causing regressions in fio itself. The > > tools that xfstests depends on need to be stable and relatively > > unchanging, because we're not testing them - we're testing the > > filesystem. The less the environemnt changes around the things we're > > actually supposed to be regression testing, the better. > Yes, but we do not have to advance submodule update unless we need it. > Project may goes forward but we still can use old commit if needed. Sure, but that them means we need to track fio closely enough and commit changes to the upstream xfstests repository whenever someone needs to move it forward. It's a centralised solution that doesn't improve the workflow of significant users of xfstests. Indeed, what happens if we take this and run it on an old distro or platform that a current fio hasn't even been tested on (e.g. RHEL 5.x, SLES10.x, MIPSEL or SH)? i.e. what happens when the blessed xfstests fio version doesn't even compile on the test target? It gets messy in a hurry because the xfstests maintainers have to solve that problem. I *much* prefer to have external dependencies handled the same way for all external tools and libraries: if the distro doesn't supply it, then the user needs to download it, install it and get it working themselves. If they don't install it or the installed version is too old, then the tests get skipped. That moves the burden of dealing with fio integration issues to the end user, not onto the xfstests maintainers. End users are scalable, maintainers are not. > > > P2) Prevent duplicating of source code (fsstress.c/aio-stress.c and > > > etc). If some one want to add new feature to submodule he > > > simply push it to official submodule repo and move submodule HEAD > > > In that both parties(submodule maintainer and project maintainer) > > > will benefit because new features will be available to every > > > submodule user > > > Cons: > > > C1) New dependencies > > > C2) Learn people how to work with submodules > > > > > > I'll not assume (C2) as a serious argument because this is just one more > > > git's command. For most users should just add new option to clone: > > > git clone --recursive git://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git > > > > Doesn't work for me. I keep local mirrors of all git trees that I > > use regularly and update them by cron jobs so that I don't have to > > go to the internet for every local tree that I clone or update. > > > > That's particularly important for me because I'm a *long* way from > > the US or Europe and cloning from scratch over the internet takes a > > long time and suck up a lot of bandwidth. I don't even allow my test > > machines to access the internet - they only know about the local > > network and mirrors. I'd have to overide the fio submodule URL in > > the xfstests repository on every test machine, and that gets messy > > in a hurry. > > > > Also, we distribute xfstests as a tarball, and there has been talk of > > proper packaging (rpm/deb) as well. In those cases, the git > > submodule approach does not work as we have to depend on the distro > > supplied fio packages... > Yes, if this is mandatory. it makes packaging harder but not too > complex. IMO, the submodule approach is an all-or-nothing approach that is difficult to opt-out of or work around. Making it harder to maintain a working test environment for a significant percentage of the xfstests userbase is not a win, IMO. > > > (C1) Is not big deal in case of Fio because we already depends from > > > libaio. > > > > There's also a fio version dependency. i.e. _require_fio has to > > detect whether the currently installed fio is of sufficiently recent > > version for the tests to run. > > > > > (P2) Makes xfstest coverage larger because all new tests which use new > > > submodules functionality will start to work by default (today it > > > silently ignored). As i already told fio is under rapid > > > development Jens Axboe does very good job so (P2) really works for > > > me, new features i need for xfstets was reviewed and accepted by Jens > > > http://git.kernel.dk/?p=fio.git;a=commit;h=8b28bd41375930664a0ff9ff9b101a88ac416ac5 > > > http://git.kernel.dk/?p=fio.git;a=commit;h=9c25d2e3f498707c4fd5a4bb0adf9867ecb17768 > > > http://git.kernel.dk/?p=fio.git;a=commit;h=e615ceafbe3962a35b7a7e06a0c8f4e2c0652c65 > > > > For me, that's not a "pro" - that's a "con" as i explained above. > > > > > > (I package fio for Fedora, is it not commonly available on other > > > > distros?) > > > > Available for Debian, which means all it's derivatives also have it. > > > > In short, I'd prefer we continue to use package level dependencies > > detected through configure/_require_foo infrastructure than using > > source tree level dependencies. Package level dependencies are much, > > much easier to manage for most people and don't require everyone to > > have internet access on the machines that xfstests is being built > > on.... > Ok i'll go back to _require_fio $VER approach, but it is reasonable to > add prep script which will fetch or install all necessary packages > so user can explicitly run it if internet is available. I don't think that a "fetch and build this tool" script is really something that is part of xfstests. Having the configure scripts warn that the required version of fio was not found and giving a pointer to the repository is consistent with the way we curently handle missing external build dependencies. Yes, I dislike autoconf at times, too, but I think it's a better solution to external dependencies at the source level for xfstests than git submodules..... Cheers, Dave.
diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..f0481ea --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "src/fio"] + path = src/fio + url = git://git.kernel.dk/fio.git diff --git a/common.config b/common.config index 7bed1c5..25cddb4 100644 --- a/common.config +++ b/common.config @@ -138,6 +138,9 @@ export DF_PROG="`set_prog_path df`" [ "$DF_PROG" = "" ] && _fatal "df not found" [ "$HOSTOS" = "Linux" ] && export DF_PROG="$DF_PROG -T" +export FIO_PROG="`set_prog_path $PWD/src/fio/fio`" +[ "$FIO_PROG" = "" ] && _fatal "fio not found" + export XFS_LOGPRINT_PROG="`set_prog_path xfs_logprint`" export XFS_REPAIR_PROG="`set_prog_path xfs_repair`" export XFS_CHECK_PROG="`set_prog_path xfs_check`" diff --git a/src/Makefile b/src/Makefile index 67250ee..255bdd4 100644 --- a/src/Makefile +++ b/src/Makefile @@ -52,16 +52,18 @@ LLDLIBS += $(LIBGDBM) endif ifeq ($(HAVE_AIO), true) -SUBDIRS += aio-dio-regress +SUBDIRS += aio-dio-regress \ + fio + endif CFILES = $(TARGETS:=.c) LDIRT = $(TARGETS) -default: depend $(TARGETS) $(SUBDIRS) +default: .depend $(TARGETS) $(SUBDIRS) -depend: .dep +.depend: .dep include $(BUILDRULES) diff --git a/src/aio-dio-regress/Makefile b/src/aio-dio-regress/Makefile index 79dd55d..fcead9a 100644 --- a/src/aio-dio-regress/Makefile +++ b/src/aio-dio-regress/Makefile @@ -8,9 +8,9 @@ LDIRT = $(TARGETS) LLDLIBS = -laio -lpthread -default: depend $(TARGETS) +default: .depend $(TARGETS) -depend: .dep +.depend: .dep include $(BUILDRULES) diff --git a/src/fio b/src/fio new file mode 160000 index 0000000..e12d280 --- /dev/null +++ b/src/fio @@ -0,0 +1 @@ +Subproject commit e12d2800f811cb64d376cfdaed9a1257f3fa9c99
FIO is very flexible io generator, i would call it IO swiss knife. Currently we have tonnes of hardcoded application which reproduces some predefined scenario. This approach has obvious dissadvantages 1) Lack of flexability: once 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. Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> --- .gitmodules | 3 +++ common.config | 3 +++ src/Makefile | 8 +++++--- src/aio-dio-regress/Makefile | 4 ++-- src/fio | 1 + 5 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 .gitmodules create mode 160000 src/fio