From: Jens Axboe <jens.axboe@oracle.com>
To: Radha Ramachandran <radha@google.com>
Cc: fio@vger.kernel.org
Subject: Re: Disabling verify when norandommap is given
Date: Thu, 19 Feb 2009 21:12:59 +0100 [thread overview]
Message-ID: <20090219201259.GM29783@kernel.dk> (raw)
In-Reply-To: <66dfd3fe0902191156y694184c4mbf7b7837410d72ac@mail.gmail.com>
On Thu, Feb 19 2009, Radha Ramachandran wrote:
> Yes, this works for me.
> Thanks for looking into this.
Thanks for testing, I'll double check and test myself tomorrow and then
integrate.
> -radha
>
> On Thu, Feb 19, 2009 at 10:26 AM, Jens Axboe <jens.axboe@oracle.com> wrote:
> > On Thu, Feb 19 2009, Radha Ramachandran wrote:
> >> Yes, that makes sense for a randwrite operation.
> >> But is it acceptable to allow norandommap with verify for
> >> read/randomread only operations with no writes involved. The case Iam
> >> specifically interested in is doing sequential writes followed by
> >> sequential reads (with verify) and then randomaccess reads (with
> >> verify). For a small enough block size on a large enough drive the
> >> norandommap takes up too much memory.
> >
> > The memory usage is indeed problematic, that is why the option exists.
> > I'd be very happy to slim that down...
> >
> > What you suggest will work, but only for fixed size blocks. Once you
> > have varying block sizes, a given random minimum block offset may be
> > inside a verify block, not at the start of it.
> >
> > So I guess the 'norandommap disables verify' can be relaxed to
> > 'norandommap disables verify IFF non-fixed block sizes are used'. I'm
> > assuming that would work for you? Please try the below patch. If
> > succesful, I'll augment it with an updated HOWTO description.
> >
> > diff --git a/init.c b/init.c
> > index 95c282a..001e5c4 100644
> > --- a/init.c
> > +++ b/init.c
> > @@ -206,6 +206,13 @@ static int setup_rate(struct thread_data *td)
> > return 0;
> > }
> >
> > +static int fixed_block_size(struct thread_options *o)
> > +{
> > + return o->min_bs[DDIR_READ] == o->max_bs[DDIR_READ] &&
> > + o->min_bs[DDIR_WRITE] == o->max_bs[DDIR_WRITE] &&
> > + o->min_bs[DDIR_READ] == o->min_bs[DDIR_WRITE];
> > +}
> > +
> > /*
> > * Lazy way of fixing up options that depend on each other. We could also
> > * define option callback handlers, but this is easier.
> > @@ -269,8 +276,10 @@ static int fixup_options(struct thread_data *td)
> > if (!o->file_size_high)
> > o->file_size_high = o->file_size_low;
> >
> > - if (o->norandommap && o->verify != VERIFY_NONE) {
> > - log_err("fio: norandommap given, verify disabled\n");
> > + if (o->norandommap && o->verify != VERIFY_NONE
> > + && !fixed_block_size(o)) {
> > + log_err("fio: norandommap given for variable block sizes, "
> > + "verify disabled\n");
> > o->verify = VERIFY_NONE;
> > }
> > if (o->bs_unaligned && (o->odirect || td->io_ops->flags & FIO_RAWIO))
> >
> > --
> > Jens Axboe
> >
> >
--
Jens Axboe
prev parent reply other threads:[~2009-02-19 20:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-18 23:12 Disabling verify when norandommap is given Radha Ramachandran
2009-02-19 7:47 ` Jens Axboe
2009-02-19 18:10 ` Radha Ramachandran
2009-02-19 18:26 ` Jens Axboe
2009-02-19 19:56 ` Radha Ramachandran
2009-02-19 20:12 ` Jens Axboe [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090219201259.GM29783@kernel.dk \
--to=jens.axboe@oracle.com \
--cc=fio@vger.kernel.org \
--cc=radha@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox