linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: ard.biesheuvel@linaro.org (Ard Biesheuvel)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/5] Kernel mode NEON for XOR and RAID6
Date: Thu,  6 Jun 2013 17:03:00 +0200	[thread overview]
Message-ID: <1370530985-20619-1-git-send-email-ard.biesheuvel@linaro.org> (raw)

Hi all,

This is a partial repost of the patches I proposed a couple of weeks ago to add
support for VFP/NEON in kernel mode.

This time, I have included two use cases that I have been using, XOR and RAID-6
checksumming. The former gets a 60% performance boost on the NEON, the latter
over 400%.


ARM: add support for kernel mode NEON

Adds kernel_neon_begin/end (renamed from kernel_vfp_begin/end in the previous
version to de-emphasize the VFP part as VFP code that needs software assistance
is not supported currently)
Introduces <asm/neon.h> and the Kconfig symbol KERNEL_MODE_NEON. This has been
aligned with Catalin for arm64, so any NEON code that does not use assembly but
intrinsics or the GCC vectorizer (such as my examples) can potentially be shared
between arm and arm64 archs.


ARM: move VFP init to an earlier boot stage

This is needed so the NEON is enabled when the XOR and RAID-6 algo boot time
benchmarks are run.


ARM: be strict about FP exceptions in kernel mode

This adds a check to vfp_support_entry() to flag unsupported uses of the
NEON/VFP in kernel mode. FP exceptions (bounces) are flagged as a BUG(), this is
because of their potentially intermittent nature. Exceptions caused by the fact
that kernel_neon_begin has not been called are just routed through the undef
handler.


ARM: crypto: add NEON accelerated XOR implementation

This is the xor_blocks() implementation built with -ftree-vectorize, 60% faster
than optimized ARM code. It calls in_interrupt() to check whether the NEON
flavor can be used: this should really not be necessary, but due to xor_blocks's
quite generic nature, there is no telling how exactly people may be using it in
the real world.


lib/raid6: add ARM-NEON accelerated syndrome calculation

This is a port of the RAID-6 checksumming code in altivec.uc ported to use NEON
intrinsics. It is about 4x faster than the sequential code. As this code does
not live under arch/arm, I will send this patch separately to the appropriate 
list if/when the prerequisite patches from this series have been accepted.

-- 
Ard.


 arch/arm/Kconfig            |  7 ++++
 arch/arm/include/asm/neon.h | 36 ++++++++++++++++++++
 arch/arm/include/asm/xor.h  | 73 +++++++++++++++++++++++++++++++++++++++++
 arch/arm/lib/Makefile       |  6 ++++
 arch/arm/lib/xor-neon.c     | 42 ++++++++++++++++++++++++
 arch/arm/vfp/vfphw.S        |  5 +++
 arch/arm/vfp/vfpmodule.c    | 56 ++++++++++++++++++++++++++++++-
 include/linux/raid/pq.h     |  5 +++
 lib/raid6/.gitignore        |  1 +
 lib/raid6/Makefile          | 31 ++++++++++++++++++
 lib/raid6/algos.c           |  6 ++++
 lib/raid6/neon.c            | 58 ++++++++++++++++++++++++++++++++
 lib/raid6/neon.uc           | 80 +++++++++++++++++++++++++++++++++++++++++++++
 lib/raid6/test/Makefile     | 19 ++++++++++-
 14 files changed, 423 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/include/asm/neon.h
 create mode 100644 arch/arm/lib/xor-neon.c
 create mode 100644 lib/raid6/neon.c
 create mode 100644 lib/raid6/neon.uc

-- 
1.8.1.2

             reply	other threads:[~2013-06-06 15:03 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-06 15:03 Ard Biesheuvel [this message]
2013-06-06 15:03 ` [PATCH 1/5] ARM: add support for kernel mode NEON Ard Biesheuvel
2013-06-06 15:03 ` [PATCH 2/5] ARM: move VFP init to an earlier boot stage Ard Biesheuvel
2013-06-06 15:03 ` [PATCH 3/5] ARM: be strict about FP exceptions in kernel mode Ard Biesheuvel
2013-06-06 15:03 ` [PATCH 4/5] ARM: crypto: add NEON accelerated XOR implementation Ard Biesheuvel
2013-06-06 15:45   ` Nicolas Pitre
2013-06-06 15:03 ` [PATCH 5/5] lib/raid6: add ARM-NEON accelerated syndrome calculation Ard Biesheuvel
2013-06-06 15:55   ` Nicolas Pitre
2013-06-06 15:17 ` [PATCH 0/5] Kernel mode NEON for XOR and RAID6 Will Deacon
2013-06-06 15:52   ` Ard Biesheuvel
2013-06-06 16:17   ` Nicolas Pitre
2013-06-06 23:08     ` Rob Herring
2013-06-07 17:50     ` Will Deacon
2013-06-07 19:49       ` Ard Biesheuvel
2013-06-08  3:09       ` Nicolas Pitre
2013-06-21  9:33         ` Will Deacon
2013-06-21 10:08           ` Ard Biesheuvel
2013-06-21 14:58             ` Christopher Covington
2013-06-24  8:08               ` Ard Biesheuvel
2013-06-24  8:54                 ` Russell King - ARM Linux
2013-06-24  9:10                   ` Ard Biesheuvel
2013-06-25 13:56               ` Dave Martin
2013-06-25 14:14                 ` Ard Biesheuvel
2013-06-25 14:29                   ` Dave Martin

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=1370530985-20619-1-git-send-email-ard.biesheuvel@linaro.org \
    --to=ard.biesheuvel@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.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).