All of lore.kernel.org
 help / color / mirror / Atom feed
From: Helge Hafting <helge.hafting@aitel.hist.no>
To: Francis Moreau <francis.moro@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [CRYPTO] is it really optimized ?
Date: Fri, 13 Apr 2007 14:17:52 +0200	[thread overview]
Message-ID: <461F74F0.1070206@aitel.hist.no> (raw)
In-Reply-To: <38b2ab8a0704121239sd848440t6ed23d71dc68798c@mail.gmail.com>

Francis Moreau wrote:
> Hi,
>
> After reading the crypto code and trying to implement a AES driver,
> I'm wondering if the current  implementation is optimum. My plan is to
> use _exclusively_ the AES driver to encrypt filesystems by using
> eCryptfs for example.
>
> But it seems that because the current implementation of the crypto
> core allows the drivers to be accessed by any part of the kernel at
> any time, that forces the AES driver to do extra works for each block
> ciphering: mainly they are (a) set the key in AES controller (b)
> generate the decryption key if in decrypt mode.
>
> So is this interpretation right ? If so wouldn't it be appropriate to
> introduce a mechanism to reserve this AES hardware for a special
> purpose (filesystem encryptions) and thus make it as fast as possible
> ?
>
Would this really help?
When reading/writing files, most of the time is i/o-wait, isn't it?

Reserving the device exclusively seems excessive. How about
a quick test to see if someone else have been using it since
the last time your crypto-fs used it?  If nobody else used it, then
you don't need to reset they key and so on.

If nobody else is using the AES controller, you get the same speed
as with a reservation.  If something else is using AES then it won't be
as fast, but then the AES controller have been used for other useful
work as well.  Other parts of the kernel surely won't use it just for 
fun. :-)

Helge Hafting



  reply	other threads:[~2007-04-13 12:24 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-12 19:39 [CRYPTO] is it really optimized ? Francis Moreau
2007-04-13 12:17 ` Helge Hafting [this message]
2007-04-13 13:30   ` Francis Moreau
2007-04-14  4:30     ` Herbert Xu
2007-04-14 13:15       ` Francis Moreau
2007-04-14 19:34         ` Herbert Xu
2007-04-14 19:44           ` Michael Halcrow
2007-04-15 11:06             ` Satyam Sharma
2007-04-15 14:31               ` Satyam Sharma
2007-04-15 15:31                 ` Michael Halcrow
2007-04-15 16:10                   ` Satyam Sharma
2007-04-14 21:10           ` Francis Moreau
2007-04-15  7:52             ` Herbert Xu
2007-04-16  8:37               ` Francis Moreau
2007-04-17  0:41                 ` Herbert Xu
2007-04-17 12:36                   ` Francis Moreau
2007-04-17 13:04                     ` Evgeniy Polyakov
2007-04-17 13:42                       ` Herbert Xu
2007-04-17 14:01                         ` Francis Moreau
2007-04-17 15:08                           ` Evgeniy Polyakov
2007-04-17 15:34                             ` Francis Moreau
2007-04-17 15:57                               ` Evgeniy Polyakov
2007-04-17 16:18                                 ` Francis Moreau
2007-04-17 17:07                                   ` Evgeniy Polyakov
2007-04-17 13:57                       ` Francis Moreau
2007-04-17 13:40                     ` Herbert Xu
2007-04-17 13:59                       ` Francis Moreau
2007-04-17 14:02                         ` Herbert Xu
2007-04-17 14:41                           ` Francis Moreau
2007-04-17 15:40                             ` Roland Dreier
2007-04-17 16:14                               ` Francis Moreau
2007-04-17 16:33                                 ` Roland Dreier
2007-04-17 17:24                                   ` Francis Moreau
2007-04-17 17:34                                     ` Roland Dreier
2007-04-19  8:07                                       ` Francis Moreau
2007-04-23 13:56                                         ` Francis Moreau

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=461F74F0.1070206@aitel.hist.no \
    --to=helge.hafting@aitel.hist.no \
    --cc=francis.moro@gmail.com \
    --cc=linux-kernel@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 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.