From: cov@codeaurora.org (Christopher Covington)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/5] Kernel mode NEON for XOR and RAID6
Date: Fri, 21 Jun 2013 10:58:21 -0400 [thread overview]
Message-ID: <51C46A0D.8070505@codeaurora.org> (raw)
In-Reply-To: <CAKv+Gu8FTXC9XSE4DJ2LQueJ3FKjdjv8=sjDjTETH7fq+ruNGQ@mail.gmail.com>
Hi Ard,
On 06/21/2013 06:08 AM, Ard Biesheuvel wrote:
> On 21 June 2013 11:33, Will Deacon <will.deacon@arm.com> wrote:
>> On Sat, Jun 08, 2013 at 04:09:56AM +0100, Nicolas Pitre wrote:
>>> On Fri, 7 Jun 2013, Will Deacon wrote:
>>>> What's the earliest toolchain we claim to support nowadays? If that can't
>>>> deal with the intrinsics then we either need to bump the requirement, or
>>>> write this using hand-coded asm. In the case of the latter, I don't think
>>>> the maintenance overhead of having two implementations is worth it.
>>>
>>> We have many different minimum toolchain version requirements attached
>>> to different features being enabled already, ftrace being one of them if
>>> I remember correctly. For these Neon optimizations the minimum gcc
>>> version is v4.6.
>>>
>>> Given that this is going to be interesting mostly to server systems, and
>>> given that ARM server deployments are rather new, I don't see the point
>>> of compiling a new server environment using an older gcc version.
>>
>> I've mulled over this, had some discussions with our toolchain guys and
>> have concluded the following:
>>
>> - The intrinsics are actually ok. I was sceptical at first, but I've been
>> assured that they should do a reasonable job (echoing your performance
>> figures).
>>
>> - The current approach is targetting servers and isn't (yet) suitable for
>> mobile.
>>
>> So, given that the patches do the right thing wrt GCC version, the only
>> remaining point is that we need to keep an eye out for people trying to
>> re-use this stuff for mobile (likely crypto, as I mentioned earlier). When
>> that happens, we should consider revisiting the benchmark/power figures.
>>
>
> OK, so a number of points have been raised in this discussion, let me
> address them one by one:
>
> Should we allow NEON to be used in the kernel?
>
> The consensus is not to allow floating point. However, NEON is
> different, as the performance gains are considerable and there is no
> dependency on support code, which makes it not as hairy as
> conventional (pre-v3) VFP. Also, managing the vfpstates is easily
> doable if NEON is only used outside interrupt context and with
> preemption disabled.
>
>
> Does my series implement it correctly?
>
> I have addressed Russell's first round of comments. Happy to take
> another round if necessary.
>
>
> Should we allow NEON intrinsics in the kernel?
> Should we allow GCC-generated NEON in the kernel?
>
> Only if the implementation is clear on which minimum version of GCC it
> requires. We could use my examples to set a precedent on what is a
> suitable way to use NEON intrinsics or the vectorizer in kernel code
> (which includes coding it such that it can be reused for arm64 with no
> modifications)
>
>
> Is kernel mode NEON suitable for mobile?
>
> To me, it is unclear why kernel and userland are so different in this
> respect. However, kernel mode NEON is separately configurable from
> Kconfig so it can be disabled at will.
>
>
> Is there a point to doing a boot time benchmark to select the optimal
> implementation of an algorithm?
>
> Perhaps not but unrelated to kernel mode NEON.
If this is indeed the consensus (I don't disagree with any of it myself),
perhaps committing the main points, guidelines, and examples to
Documentation/arm/* would be useful.
Christopher
--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by the Linux Foundation.
next prev parent reply other threads:[~2013-06-21 14:58 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-06 15:03 [PATCH 0/5] Kernel mode NEON for XOR and RAID6 Ard Biesheuvel
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 [this message]
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=51C46A0D.8070505@codeaurora.org \
--to=cov@codeaurora.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).