From: Ted Ts'o <tytso@mit.edu>
To: Eric Gouriou <egouriou@google.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH 2/2] ext4: optimize memmmove lengths in extent/index insertions
Date: Thu, 27 Oct 2011 11:56:40 -0400 [thread overview]
Message-ID: <20111027155640.GG31921@thunk.org> (raw)
In-Reply-To: <1317020069-16355-2-git-send-email-egouriou@google.com>
On Sun, Sep 25, 2011 at 11:54:29PM -0700, Eric Gouriou wrote:
> ext4_ext_insert_extent() (respectively ext4_ext_insert_index())
> was using EXT_MAX_EXTENT() (resp. EXT_MAX_INDEX()) to determine
> how many entries needed to be moved beyond the insertion point.
> In practice this means that (320 - I) * 24 bytes were memmove()'d
> when I is the insertion point, rather than (#entries - I) * 24 bytes.
>
> This patch uses EXT_LAST_EXTENT() (resp. EXT_LAST_INDEX()) instead
> to only move existing entries. The code flow is also simplified
> slightly to highlight similarities and reduce code duplication in
> the insertion logic.
>
> This patch reduces system CPU consumption by over 25% on a 4kB
> synchronous append DIO write workload when used with the
> pre-2.6.39 x86_64 memmove() implementation. With the much faster
> 2.6.39 memmove() implementation we still see a decrease in
> system CPU usage between 2% and 7%.
>
> Note that the ext_debug() output changes with this patch, splitting
> some log information between entries. Users of the ext_debug() output
> should note that the "move %d" units changed from reporting the number
> of bytes moved to reporting the number of entries moved.
>
> Signed-off-by: Eric Gouriou <egouriou@google.com>
Applied, although the patch needed to be tweaked slightly to apply
given recent changes to the surrounding code. I think I merged in the
patch correctly, but I want to run some extended tests to make sure no
problems turn up.
- Ted
next prev parent reply other threads:[~2011-10-27 15:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-26 6:54 [PATCH 1/2] ext4: optimize ext4_ext_convert_to_initialized() Eric Gouriou
2011-09-26 6:54 ` [PATCH 2/2] ext4: optimize memmmove lengths in extent/index insertions Eric Gouriou
2011-09-26 12:23 ` Dmitry Monakhov
2011-09-26 16:20 ` Eric Gouriou
2011-10-27 15:56 ` Ted Ts'o [this message]
2011-10-27 15:46 ` [PATCH 1/2] ext4: optimize ext4_ext_convert_to_initialized() Ted Ts'o
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=20111027155640.GG31921@thunk.org \
--to=tytso@mit.edu \
--cc=egouriou@google.com \
--cc=linux-ext4@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).