All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Y. Ts'o" <tytso@mit.edu>
To: Eric Biggers <ebiggers@google.com>
Cc: linux-fscrypt@vger.kernel.org, Jaegeuk Kim <jaegeuk@kernel.org>,
	Paul Crowley <paulcrowley@google.com>,
	Enric Balletbo i Serra <enric.balletbo@collabora.com>,
	Mikulas Patocka <mpatocka@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fscrypt: use unbound workqueue for decryption
Date: Sun, 20 May 2018 20:55:02 -0400	[thread overview]
Message-ID: <20180521005502.GA4464@thunk.org> (raw)
In-Reply-To: <20180420233002.134687-1-ebiggers@google.com>

On Fri, Apr 20, 2018 at 04:30:02PM -0700, Eric Biggers wrote:
> Improve fscrypt read performance by switching the decryption workqueue
> from bound to unbound.  With the bound workqueue, when multiple bios
> completed on the same CPU, they were decrypted on that same CPU.  But
> with the unbound queue, they are now decrypted in parallel on any CPU.
> 
> Although fscrypt read performance can be tough to measure due to the
> many sources of variation, this change is most beneficial when
> decryption is slow, e.g. on CPUs without AES instructions.  For example,
> I timed tarring up encrypted directories on f2fs.  On x86 with AES-NI
> instructions disabled, the unbound workqueue improved performance by
> about 25-35%, using 1 to NUM_CPUs jobs with 4 or 8 CPUs available.  But
> with AES-NI enabled, performance was unchanged to within ~2%.
> 
> I also did the same test on a quad-core ARM CPU using xts-speck128-neon
> encryption.  There performance was usually about 10% better with the
> unbound workqueue, bringing it closer to the unencrypted speed.
> 
> The unbound workqueue may be worse in some cases due to worse locality,
> but I think it's still the better default.  dm-crypt uses an unbound
> workqueue by default too, so this change makes fscrypt match.
> 
> Signed-off-by: Eric Biggers <ebiggers@google.com>

Applied, thanks.

						- Ted

      reply	other threads:[~2018-05-21  0:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-20 23:30 [PATCH] fscrypt: use unbound workqueue for decryption Eric Biggers
2018-05-21  0:55 ` Theodore Y. Ts'o [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=20180521005502.GA4464@thunk.org \
    --to=tytso@mit.edu \
    --cc=ebiggers@google.com \
    --cc=enric.balletbo@collabora.com \
    --cc=jaegeuk@kernel.org \
    --cc=linux-fscrypt@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpatocka@redhat.com \
    --cc=paulcrowley@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.