From: Jens Axboe <jaxboe@fusionio.com>
To: Steven Lang <tirea@google.com>
Cc: fio@vger.kernel.org
Subject: Re: [PATCH] Optimize pattern verify
Date: Tue, 7 Feb 2012 09:40:43 +0100 [thread overview]
Message-ID: <4F30E38B.3070309@fusionio.com> (raw)
In-Reply-To: <CAAUT-yNW0UEPqSFRwvEM68xx1+X6dnbmmHAvX8hcZJgHLTT5Qg@mail.gmail.com>
On 02/07/2012 03:50 AM, Steven Lang wrote:
> Similar to the patch last week, this optimizes the pattern verify
> operation to use optimized library calls like memcmp(), and only fall
> back to byte-by-byte if there is a miscompare to locate it.
>
> This uses the same premise that the pattern is repeated as many times
> as possible to do large compares in a single call. For single byte
> pattern, the setup fills the pattern space, and verify assumes it is
> full.
>
> Tested by running a script which created an 8k file with 4k bs and,
> one byte at a time, tried corrupting the pattern and running a read
> pass and verified it still found miscompares across the whole range of
> the pattern. This was done with a pattern length of 1 and 3 bytes.
>
> In performance tests, this was about 8 times more efficient on
> verifies than without this patch.
Great, applied! Thanks.
--
Jens Axboe
prev parent reply other threads:[~2012-02-07 8:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-07 2:50 [PATCH] Optimize pattern verify Steven Lang
2012-02-07 8:40 ` 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=4F30E38B.3070309@fusionio.com \
--to=jaxboe@fusionio.com \
--cc=fio@vger.kernel.org \
--cc=tirea@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